diff --git a/lostplaces/lostplaces_app/tests/models/__init__.py b/lostplaces/lostplaces_app/tests/models/__init__.py index f2045e5..17b12ed 100644 --- a/lostplaces/lostplaces_app/tests/models/__init__.py +++ b/lostplaces/lostplaces_app/tests/models/__init__.py @@ -84,7 +84,7 @@ class ModelTestCase: return field - def _test_char_field(self, field_name, min_length, max_length, must_have={}, must_hot_have={}): + def assertCharField(self, field_name, min_length, max_length, must_have={}, must_hot_have={}): ''' Tests if the given field is a char field and if its max_length is in min_length and max_legth diff --git a/lostplaces/lostplaces_app/tests/models/test_abstract_models.py b/lostplaces/lostplaces_app/tests/models/test_abstract_models.py index 19afcb0..42bcc31 100644 --- a/lostplaces/lostplaces_app/tests/models/test_abstract_models.py +++ b/lostplaces/lostplaces_app/tests/models/test_abstract_models.py @@ -23,7 +23,7 @@ class MapablePointTestCase(ModelTestCase, TestCase): model = MapablePoint def test_name(self): - self._test_char_field( + self.assertCharField( field_name='name', min_length=10, max_length=100 diff --git a/lostplaces/lostplaces_app/tests/models/test_place_model.py b/lostplaces/lostplaces_app/tests/models/test_place_model.py index ccb6d8a..b14b112 100644 --- a/lostplaces/lostplaces_app/tests/models/test_place_model.py +++ b/lostplaces/lostplaces_app/tests/models/test_place_model.py @@ -34,7 +34,7 @@ class PlaceTestCase(SubmittableTestCase, TestCase): def test_location(self): - self._test_char_field( + self.assertCharField( field_name='location', min_length=10, max_length=100 diff --git a/lostplaces/lostplaces_app/tests/models/test_voucher_model.py b/lostplaces/lostplaces_app/tests/models/test_voucher_model.py index 76796f8..74a9fe0 100644 --- a/lostplaces/lostplaces_app/tests/models/test_voucher_model.py +++ b/lostplaces/lostplaces_app/tests/models/test_voucher_model.py @@ -19,7 +19,7 @@ class VoucheTestCase(ModelTestCase, TestCase): ) def test_voucher_code(self): - self._test_char_field( + self.assertCharField( 'code', 10, 100,