Commit 3fdbbf55 authored by Okhin's avatar Okhin
Browse files

Fix the data given to a test

parent e0173e2f
......@@ -201,10 +201,11 @@ class TestArticleViews(TestCase):
a = json.loads(serializers.serialize('json', [self.articles[0]]))[0]
a['fields']['title'] = 'Zog Zog'
r ='/rp/article/edit/{}/'.format(a['pk']), a['fields'])
a = Article.objects.get(pk=a['pk'])
pk = self.articles[0].pk
fields = {'title': 'Zog Zog'}
r ='/rp/article/edit/{}/'.format(pk), fields)
a = Article.objects.get(pk=pk)
assert r.status_code == 302 # We're redirecting after edit
assert a.title == 'Zog Zog'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment