1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #24693 -- Added label and label_lower property to Model._meta

This commit is contained in:
Luis Del Giudice
2015-04-26 17:05:50 -04:00
committed by Markus Holtermann
parent 811d7870a5
commit 69ddc1b3da
10 changed files with 80 additions and 35 deletions

View File

@@ -49,6 +49,17 @@ class GetFieldsTests(OptionsBaseTests):
fields += ["errors"]
class LabelTests(OptionsBaseTests):
def test_label(self):
for model, expected_result in TEST_RESULTS['labels'].items():
self.assertEqual(model._meta.label, expected_result)
def test_label_lower(self):
for model, expected_result in TEST_RESULTS['lower_labels'].items():
self.assertEqual(model._meta.label_lower, expected_result)
class DataTests(OptionsBaseTests):
def test_fields(self):