Commit 11c1e61b authored by Alex Gaynor's avatar Alex Gaynor
Browse files

Fixed #16925 -- Make sure a signal is disconnected if the test fails. Thanks...

Fixed #16925 -- Make sure a signal is disconnected if the test fails. Thanks to aaugustin for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 735fbcfe
Loading
Loading
Loading
Loading
+15 −13
Original line number Diff line number Diff line
@@ -277,6 +277,7 @@ class TestFixtures(TestCase):
        global pre_save_checks
        pre_save_checks = []
        signals.pre_save.connect(animal_pre_save_check)
        try:
            management.call_command(
                'loaddata',
                'animal.xml',
@@ -289,6 +290,7 @@ class TestFixtures(TestCase):
                    ("Count = 42 (<type 'int'>)", "Weight = 1.2 (<type 'float'>)")
                ]
            )
        finally:
            signals.pre_save.disconnect(animal_pre_save_check)

    def test_dumpdata_uses_default_manager(self):