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:
parent
17c2c4362a
commit
d0c3aee64c
|
@ -133,7 +133,7 @@ class TestRunner:
|
||||||
|
|
||||||
# Run the API tests.
|
# Run the API tests.
|
||||||
p = doctest.DocTestParser()
|
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)
|
dtest = p.get_doctest(mod.API_TESTS, test_namespace, model_name, None, None)
|
||||||
# Manually set verbose=False, because "-v" command-line parameter
|
# Manually set verbose=False, because "-v" command-line parameter
|
||||||
# has side effects on doctest TestRunner class.
|
# has side effects on doctest TestRunner class.
|
||||||
|
|
Loading…
Reference in New Issue