mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-04-12 10:51:03 +00:00
Merge pull request #278 from ifosch/utils-tests-improvements
djadmin2.utils.model_options tested to adapt to model._meta changes
This commit is contained in:
commit
12d19fc0ee
1 changed files with 18 additions and 0 deletions
|
|
@ -33,12 +33,30 @@ class UtilsTest(TestCase):
|
|||
UtilsTestModel._meta,
|
||||
utils.model_options(UtilsTestModel)
|
||||
)
|
||||
UtilsTestModel._meta.verbose_name = "Utils Test Model is singular"
|
||||
UtilsTestModel._meta.verbose_name_plural = "Utils Test Model are " +\
|
||||
" plural"
|
||||
self.assertEquals(
|
||||
UtilsTestModel._meta,
|
||||
utils.model_options(UtilsTestModel)
|
||||
)
|
||||
UtilsTestModel._meta.verbose_name = "Utils Test Model"
|
||||
UtilsTestModel._meta.verbose_name_plural = "Utils Test Models"
|
||||
|
||||
def test_as_model_instance(self):
|
||||
self.assertEquals(
|
||||
self.instance._meta,
|
||||
utils.model_options(self.instance)
|
||||
)
|
||||
self.instance._meta.verbose_name = "Utils Test Model is singular"
|
||||
self.instance._meta.verbose_name_plural = "Utils Test Model are " +\
|
||||
" plural"
|
||||
self.assertEquals(
|
||||
self.instance._meta,
|
||||
utils.model_options(self.instance)
|
||||
)
|
||||
self.instance._meta.verbose_name = "Utils Test Model"
|
||||
self.instance._meta.verbose_name_plural = "Utils Test Models"
|
||||
|
||||
def test_admin2_urlname(self):
|
||||
self.assertEquals(
|
||||
|
|
|
|||
Loading…
Reference in a new issue