summaryrefslogtreecommitdiff
path: root/tests/dispatch
diff options
context:
space:
mode:
authorJason Myers <jason@jasonamyers.com>2013-11-02 23:36:09 -0500
committerJason Myers <jason@jasonamyers.com>2013-11-02 23:50:49 -0500
commit7a61c68c50d3837c50e35c252fd76220f08b5290 (patch)
tree586f16a3f02c2b45ffb3dd2af834c0ef604e099c /tests/dispatch
parent0fdb692c6c94d912f17a3e2ad12413fb072d38ec (diff)
PEP8 cleanup
Signed-off-by: Jason Myers <jason@jasonamyers.com>
Diffstat (limited to 'tests/dispatch')
-rw-r--r--tests/dispatch/tests/test_dispatcher.py8
-rw-r--r--tests/dispatch/tests/test_saferef.py4
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/dispatch/tests/test_dispatcher.py b/tests/dispatch/tests/test_dispatcher.py
index 9a8d7146cf..1ab4a69d33 100644
--- a/tests/dispatch/tests/test_dispatcher.py
+++ b/tests/dispatch/tests/test_dispatcher.py
@@ -23,9 +23,11 @@ else:
def garbage_collect():
gc.collect()
+
def receiver_1_arg(val, **kwargs):
return val
+
class Callable(object):
def __call__(self, val, **kwargs):
return val
@@ -116,10 +118,10 @@ class DispatcherTests(unittest.TestCase):
def uid_based_receiver_2(**kwargs):
pass
- a_signal.connect(uid_based_receiver_1, dispatch_uid = "uid")
- a_signal.connect(uid_based_receiver_2, dispatch_uid = "uid")
+ a_signal.connect(uid_based_receiver_1, dispatch_uid="uid")
+ a_signal.connect(uid_based_receiver_2, dispatch_uid="uid")
self.assertEqual(len(a_signal.receivers), 1)
- a_signal.disconnect(dispatch_uid = "uid")
+ a_signal.disconnect(dispatch_uid="uid")
self._testIsClean(a_signal)
def testRobust(self):
diff --git a/tests/dispatch/tests/test_saferef.py b/tests/dispatch/tests/test_saferef.py
index 531e8f43de..6da756362a 100644
--- a/tests/dispatch/tests/test_saferef.py
+++ b/tests/dispatch/tests/test_saferef.py
@@ -3,17 +3,21 @@ import unittest
from django.dispatch.saferef import safeRef
from django.utils.six.moves import xrange
+
class Test1(object):
def x(self):
pass
+
def test2(obj):
pass
+
class Test2(object):
def __call__(self, obj):
pass
+
class SaferefTests(unittest.TestCase):
def setUp(self):
ts = []