summaryrefslogtreecommitdiff
path: root/tests/regressiontests/dispatch
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2011-10-13 12:53:02 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2011-10-13 12:53:02 +0000
commit43920cd32e24eb293b445028c7710b42f9abc7c4 (patch)
tree06adc32ae7706ce5238c5e9dee2e45aed4556677 /tests/regressiontests/dispatch
parent406f9d1fa0424e9861c2d20a1001dbf4e29d4c9c (diff)
Remove a handful of `import *` from the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/dispatch')
-rw-r--r--tests/regressiontests/dispatch/tests/test_saferef.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/regressiontests/dispatch/tests/test_saferef.py b/tests/regressiontests/dispatch/tests/test_saferef.py
index c8cfd6cce1..fecded69a5 100644
--- a/tests/regressiontests/dispatch/tests/test_saferef.py
+++ b/tests/regressiontests/dispatch/tests/test_saferef.py
@@ -1,7 +1,7 @@
-from django.dispatch.saferef import *
-
+from django.dispatch.saferef import safeRef
from django.utils import unittest
+
class Test1(object):
def x(self):
pass
@@ -32,21 +32,21 @@ class Tester(unittest.TestCase):
self.ts = ts
self.ss = ss
self.closureCount = 0
-
+
def tearDown(self):
del self.ts
del self.ss
-
+
def testIn(self):
"""Test the "in" operator for safe references (cmp)"""
for t in self.ts[:50]:
self.assertTrue(safeRef(t.x) in self.ss)
-
+
def testValid(self):
"""Test that the references are valid (return instance methods)"""
for s in self.ss:
self.assertTrue(s())
-
+
def testShortCircuit (self):
"""Test that creation short-circuits to reuse existing references"""
sd = {}
@@ -59,15 +59,15 @@ class Tester(unittest.TestCase):
else:
self.assertTrue(sd.has_key(safeRef(t)))
self.assertTrue(safeRef(t) in sd)
-
+
def testRepresentation (self):
"""Test that the reference object's representation works
-
+
XXX Doesn't currently check the results, just that no error
is raised
"""
repr(self.ss[-1])
-
+
def _closure(self, ref):
"""Dumb utility mechanism to increment deletion counter"""
self.closureCount +=1