diff --git a/lostplaces/lostplaces_app/tests/models/test_place_model.py b/lostplaces/lostplaces_app/tests/models/test_place_model.py index 3996bd6..2ca5ef5 100644 --- a/lostplaces/lostplaces_app/tests/models/test_place_model.py +++ b/lostplaces/lostplaces_app/tests/models/test_place_model.py @@ -4,9 +4,8 @@ from django.test import TestCase from django.db import models from lostplaces_app.models import Place -from lostplaces_app.tests.models import TestSubmittable +from lostplaces_app.tests.models import SubmittableTestCase from lostplaces_app.tests import mock_user -from lostplaces_app.tests.models import TestModel from taggit.managers import TaggableManager @@ -24,7 +23,7 @@ def mock_place(): return place -class PlaceTestCase(TestSubmittable, TestCase): +class PlaceTestCase(SubmittableTestCase, TestCase): model_name = 'Place' related_name = 'places' nullable = True @@ -127,10 +126,9 @@ class PlaceTestCase(TestSubmittable, TestCase): ) def test_str(self): - place = mock_place() - self.assertEqual(str(place), place.name, - msg='%s __str__ should return the name' % ( + place = self.object + self.assertTrue(place.name.lower() in str(place).lower(), + msg='Expecting %s.__str__ to contain the name' % ( self.model_name ) - )