mirror of
https://github.com/django/django.git
synced 2025-10-09 18:12:39 +00:00
magic-removal: Changed model unit tests to use new Model.objects.* syntax instead of models.*
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
69b82e1ca1
commit
c1be782510
21 changed files with 186 additions and 186 deletions
|
@ -132,7 +132,7 @@ class TestRunner:
|
|||
|
||||
# Run the API tests.
|
||||
p = doctest.DocTestParser()
|
||||
test_namespace = dict([(m._meta.module_name, getattr(mod, m._meta.module_name)) for m in mod._MODELS])
|
||||
test_namespace = dict([(m._meta.object_name, getattr(mod, m._meta.module_name).Klass) 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue