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
This commit is contained in:
Adrian Holovaty 2005-12-13 16:17:33 +00:00
parent 17c2c4362a
commit d0c3aee64c
1 changed files with 1 additions and 1 deletions

View File

@ -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.