Renaming MapablePoint

This commit is contained in:
2020-09-14 15:18:21 +02:00
parent 79ed029db0
commit 12881d9345
4 changed files with 13 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
from django.test import TestCase
from lostplaces_app.models import Taggable, MapablePoint
from lostplaces_app.models import Taggable, Mapable
from taggit.models import Tag
@@ -165,9 +165,9 @@ class TaggableViewTestCaseMixin:
msg='Expecting delete_url_name to be of type string'
)
class MapablePointViewTestCaseMixin:
class MapableViewTestCaseMixin:
def assertMapablePointContext(self, context):
def assertMapableContext(self, context):
self.assertTrue(
'all_points' in context,
msg='Expecting the context for mapable point to contain \'all_points\' attribute'
@@ -175,9 +175,9 @@ class MapablePointViewTestCaseMixin:
for point in context['all_points']:
self.assertTrue(
isinstance(point, MapablePoint),
isinstance(point, Mapable),
msg='Expecting all entries to be an instance of %s, got %s' % (
str(MapablePoint),
str(Mapable),
str(type(point))
)
)

View File

@@ -14,7 +14,7 @@ from lostplaces_app.forms import PlaceImageCreateForm, PlaceForm
from lostplaces_app.tests.views import (
ViewTestCase,
TaggableViewTestCaseMixin,
MapablePointViewTestCaseMixin
MapableViewTestCaseMixin
)
@@ -83,7 +83,7 @@ class TestPlaceListView(ViewTestCase):
self.assertContext(response, 'mapping_config')
class PlaceDetailViewTestCase(TaggableViewTestCaseMixin, MapablePointViewTestCaseMixin, ViewTestCase):
class PlaceDetailViewTestCase(TaggableViewTestCaseMixin, MapableViewTestCaseMixin, ViewTestCase):
view = PlaceDetailView
@classmethod
@@ -123,4 +123,4 @@ class PlaceDetailViewTestCase(TaggableViewTestCaseMixin, MapablePointViewTestCas
str(self.view)
)
)
self.assertMapablePointContext(response.context['mapping_config'])
self.assertMapableContext(response.context['mapping_config'])