Parametrise a test

This commit is contained in:
Iacopo Spalletti 2015-01-04 18:27:45 +01:00
parent aae7b87207
commit 9b3ab6d1e8

View file

@ -60,7 +60,8 @@ class AdminTest(BaseTest):
post_admin = admin.site._registry[Post] post_admin = admin.site._registry[Post]
post_admin.add_view(request) post_admin.add_view(request)
self.assertEqual(Post.objects.count(), 1) self.assertEqual(Post.objects.count(), 1)
self.assertEqual(Post.objects.get(translations__slug='first-post').author_id, 1) self.assertEqual(Post.objects.get(translations__slug='first-post').author_id,
request.user.pk)
with self.settings(BLOG_AUTHOR_DEFAULT=False): with self.settings(BLOG_AUTHOR_DEFAULT=False):
data = deepcopy(self.data['en'][1]) data = deepcopy(self.data['en'][1])