mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-05-25 04:33:45 +00:00
Merge branch 'master' of github.com:deschler/django-modeltranslation
This commit is contained in:
commit
c06134bff4
1 changed files with 4 additions and 3 deletions
|
|
@ -1,7 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
TODO: Merge autoregister tests from django-modeltranslation-wrapper.
|
||||
|
||||
NOTE: Perhaps ModeltranslationTestBase in tearDownClass should reload some modules,
|
||||
so that tests for other apps are in the same environment.
|
||||
|
||||
|
|
@ -48,6 +46,9 @@ except ImportError:
|
|||
# so we'll just pass in None.
|
||||
request = None
|
||||
|
||||
# How much models are registered for tests.
|
||||
TEST_MODELS = 22
|
||||
|
||||
|
||||
class reload_override_settings(override_settings):
|
||||
"""Context manager that not only override settings, but also reload modeltranslation conf."""
|
||||
|
|
@ -227,7 +228,7 @@ class ModeltranslationTest(ModeltranslationTestBase):
|
|||
self.failUnless(translator.translator)
|
||||
|
||||
# Check that all models are registered for translation
|
||||
self.assertEqual(len(translator.translator.get_registered_models()), 22)
|
||||
self.assertEqual(len(translator.translator.get_registered_models()), TEST_MODELS)
|
||||
|
||||
# Try to unregister a model that is not registered
|
||||
self.assertRaises(translator.NotRegistered,
|
||||
|
|
|
|||
Loading…
Reference in a new issue