Test if linked place matches.

This commit is contained in:
Marcus Scholz 2020-09-22 20:48:56 +02:00
parent 84f13ced80
commit 8de23a3f3b

View File

@ -91,3 +91,11 @@ class PhotoAlbumTestCase(ModelTestCase):
msg='Expecting albumlink.url to contain \'lostplaces.example.com\' string'
)
def test_linked_place(self):
albumlink = self.albumlink
place = self.place
self.assertTrue(str(albumlink.place) in str(place.name),
msg='Expecting %s.__str__ to contain the name' % (
self.model.__name__
)
)