MCPcopy
hub / github.com/django/django / assertTestIsClean

Method assertTestIsClean

tests/dispatch/tests.py:30–36  ·  view source on GitHub ↗

Assert that everything has been cleaned up automatically

(self, signal)

Source from the content-addressed store, hash-verified

28
29class DispatcherTests(SimpleTestCase):
30 def assertTestIsClean(self, signal):
31 """Assert that everything has been cleaned up automatically"""
32 # Note that dead weakref cleanup happens as side effect of using
33 # the signal's receivers through the signals API. So, first do a
34 # call to an API method to force cleanup.
35 self.assertFalse(signal.has_listeners())
36 self.assertEqual(signal.receivers, [])
37
38 @override_settings(DEBUG=True)
39 def test_cannot_connect_no_kwargs(self):

Calls 1

has_listenersMethod · 0.80

Tested by

no test coverage detected