(fig1)
| 74 | |
| 75 | |
| 76 | def test_json_renderer_show_override(fig1): |
| 77 | pio.renderers.default = "notebook" |
| 78 | expected_bundle = { |
| 79 | "application/json": json.loads(pio.to_json(fig1, remove_uids=False)) |
| 80 | } |
| 81 | |
| 82 | with mock.patch("IPython.display.display") as mock_display: |
| 83 | pio.show(fig1, renderer="json") |
| 84 | |
| 85 | mock_display.assert_called_once_with(expected_bundle, raw=True) |
| 86 | |
| 87 | |
| 88 | # Plotly mimetype |