Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
test new behaviour returns HTTP 400
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Fisher committed Mar 13, 2014
1 parent 6ba78b2 commit abdf9bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/tests/test_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def test_layer(self):
self.assertIn('runtime', response.data)
self.assertIn('config', response.data)
self.assertIn('key', json.loads(response.data['config']))
# test layer build failure
url = '/api/formations/{formation_id}/layers'.format(**locals())
body = {'id': 'autotest-fail', 'flavor': 'autotest-fail',
'config': json.dumps({'key': 'value'})}
response = self.client.post(url, json.dumps(body), content_type='application/json')
self.assertEqual(response.status_code, 400)
url = '/api/formations/{formation_id}/layers'.format(**locals())
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
Expand Down

0 comments on commit abdf9bd

Please sign in to comment.