def check_get_absolute_url(self, creation_date, url_expected): params = {'title': 'My entry', 'content': 'My content', 'slug': 'my-entry', 'creation_date': creation_date} entry = Entry.objects.create(**params) self.assertTrue(url_expected in entry.get_absolute_url())
def check_get_absolute_url(self, creation_date, url_expected): params = {"title": "My entry", "content": "My content", "slug": "my-entry", "creation_date": creation_date} entry = Entry.objects.create(**params) self.assertTrue(url_expected in entry.get_absolute_url())