Skip to content

Commit

Permalink
Fix test to not use hardcoded ids
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Feb 9, 2017
1 parent 4cb8da3 commit 2435550
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test_runner/blog/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,11 @@ def test_list(self):
response = self.client.get(reverse('blog.post_list') + "?_format=select2")
self.assertEqual(response.json(), {
'results': [
{'text': 'A First Post', 'id': 2},
{'text': 'A Fourth Post', 'id': 5},
{'text': 'A Second Post', 'id': 3},
{'text': 'A Third Post', 'id': 4},
{'text': 'Test Post', 'id': 1}
{'id': post1.id, 'text': 'A First Post'},
{'id': post4.id, 'text': 'A Fourth Post'},
{'id': post2.id, 'text': 'A Second Post'},
{'id': post3.id, 'text': 'A Third Post'},
{'id': self.post.id, 'text': 'Test Post'}
], 'err': 'nil', 'more': False})

def test_success_url(self):
Expand Down

0 comments on commit 2435550

Please sign in to comment.