From d0c3aee64caba901aa339138b6de0a976e77ce2c Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 13 Dec 2005 16:17:33 +0000 Subject: [PATCH] magic-removal: Small simplification of test_namespace assignment in runtests git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1613 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/runtests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/runtests.py b/tests/runtests.py index c10d2930b6..b15c4ab26a 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -133,7 +133,7 @@ class TestRunner: # Run the API tests. p = doctest.DocTestParser() - test_namespace = dict([(m._meta.object_name, getattr(mod, m._meta.module_name).Klass) for m in mod._MODELS]) + test_namespace = dict([(m._meta.object_name, m) for m in mod._MODELS]) dtest = p.get_doctest(mod.API_TESTS, test_namespace, model_name, None, None) # Manually set verbose=False, because "-v" command-line parameter # has side effects on doctest TestRunner class.