diff options
author | Tim Graham <timograham@gmail.com> | 2016-11-07 14:46:42 +0000 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-01-17 14:09:28 -0500 |
commit | 03087f80d14969ebfc7b81f54096941c60c9b52b (patch) | |
tree | 2a8d49d30cb7d77d0b1dfd5525410b2c585221a9 /tests/dispatch | |
parent | e8dac72a553a0deedfef6ae90495d89d9bc089c8 (diff) | |
download | django-03087f80d14969ebfc7b81f54096941c60c9b52b.tar.gz |
Refs #24205 -- Removed Signal.disconnect()'s weak argument.
Per deprecation timeline.
Diffstat (limited to 'tests/dispatch')
-rw-r--r-- | tests/dispatch/test_removedindjango20.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/dispatch/test_removedindjango20.py b/tests/dispatch/test_removedindjango20.py deleted file mode 100644 index 9b28cf789d..0000000000 --- a/tests/dispatch/test_removedindjango20.py +++ /dev/null @@ -1,24 +0,0 @@ -import warnings - -from django.dispatch import Signal -from django.test import SimpleTestCase - -a_signal = Signal(providing_args=['val']) - - -def receiver_1_arg(val, **kwargs): - return val - - -class DispatcherTests(SimpleTestCase): - - def test_disconnect_weak_deprecated(self): - a_signal.connect(receiver_1_arg) - with warnings.catch_warnings(record=True) as warns: - warnings.simplefilter('always') - a_signal.disconnect(receiver_1_arg, weak=True) - self.assertEqual(len(warns), 1) - self.assertEqual( - str(warns[0].message), - 'Passing `weak` to disconnect has no effect.', - ) |