Skip to content

Commit abdf9bd

Browse files
author
Matthew Fisher
committed
test new behaviour returns HTTP 400
1 parent 6ba78b2 commit abdf9bd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

api/tests/test_layer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ def test_layer(self):
5858
self.assertIn('runtime', response.data)
5959
self.assertIn('config', response.data)
6060
self.assertIn('key', json.loads(response.data['config']))
61+
# test layer build failure
62+
url = '/api/formations/{formation_id}/layers'.format(**locals())
63+
body = {'id': 'autotest-fail', 'flavor': 'autotest-fail',
64+
'config': json.dumps({'key': 'value'})}
65+
response = self.client.post(url, json.dumps(body), content_type='application/json')
66+
self.assertEqual(response.status_code, 400)
6167
url = '/api/formations/{formation_id}/layers'.format(**locals())
6268
response = self.client.get(url)
6369
self.assertEqual(response.status_code, 200)

0 commit comments

Comments
 (0)