Skip to content

Commit

Permalink
Test POST job
Browse files Browse the repository at this point in the history
  • Loading branch information
coagulant committed Oct 13, 2013
1 parent f70b40c commit 946ca60
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gopython3/core/tests/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ def setUp(self):
SpecFactory(package__name='jsonfield', version='0.9.19')],
status='running')

def test_post_job(self):
response = self.client.post('/api/v1/jobs/', {'requirements': 'foo\nbar>1.2'})
self.assertEqual(response.status_code, 201)
self.assertEqual(response['Location'], 'http://testserver/api/v1/jobs/2/')

def test_jobs_list(self):
response = self.client.get('/api/v1/jobs/', format='json')
self.assertDictEqual(response.data, {
Expand Down

0 comments on commit 946ca60

Please sign in to comment.