Skip to content

Commit

Permalink
refactor panel test
Browse files Browse the repository at this point in the history
  • Loading branch information
salty-ivy committed Jun 27, 2024
1 parent 1e7939a commit b03cc84
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/panels/test_async_panel_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,11 @@ def setUp(self):
self.toolbar = None

@override_settings(DEBUG_TOOLBAR_CONFIG=set_custom_toolbar_config())
def test_disable_nonasync_panels_with_asgi(self):
def test_async_panel_enabling_with_asgi(self):
self.toolbar = DebugToolbar(self.request, lambda request: HttpResponse())
for panel in self.toolbar.panels:
panel.is_async = False
self.assertFalse(panel.enabled)

@override_settings(DEBUG_TOOLBAR_CONFIG=set_custom_toolbar_config())
def test_enable_async_panels_with_asgi(self):
self.toolbar = DebugToolbar(self.request, lambda request: HttpResponse())
for panel in self.toolbar.panels:
panel.is_async = True
self.assertTrue(panel.enabled)

Expand Down

0 comments on commit b03cc84

Please sign in to comment.