Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jellegerbrandy committed Apr 20, 2016
1 parent b2de706 commit cd79394
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion restapi/tests/test_evaluations.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ def test_evaluation_collection_get(self):
self.assertEqual(response.json.get('count'), 2)
response = self.app.get(self.url_collection, {'contributor_id': user1.id})
self.assertEqual(response.json.get('count'), 1)
response = self.app.get(self.url_collection, {'contributor_id': 12345})
self.assertEqual(response.json.get('count'), 0)

# test error handling
response = self.app.get(self.url_collection, {'contributor_id': 'xx'}, expect_errors=True)
self.assertEqual(response.status, '400 Bad Request')

def test_evaluation_errors(self):
user = self.contract.create_user()
Expand All @@ -90,4 +96,4 @@ def test_evaluation_errors(self):
},
expect_errors=True,
)
self.assertTrue(response.status, 'xx')
self.assertEqual(response.status, '400 Bad Request')

0 comments on commit cd79394

Please sign in to comment.