Revision a3accf03 snf-cyclades-app/synnefo/api/test/servers.py
b/snf-cyclades-app/synnefo/api/test/servers.py | ||
---|---|---|
189 | 189 |
self.assertSuccess(response) |
190 | 190 |
self.assertEqual(VirtualMachine.objects.get(id=vm.id).name, "new_name") |
191 | 191 |
|
192 |
def test_catch_wrong_api_paths(self): |
|
193 |
response = self.myget('nonexistent') |
|
194 |
self.assertEqual(response.status_code, 400) |
|
195 |
try: |
|
196 |
error = json.loads(response.content) |
|
197 |
except ValueError: |
|
198 |
self.assertTrue(False) |
|
199 |
|
|
192 | 200 |
|
193 | 201 |
@patch('synnefo.api.util.get_image') |
194 | 202 |
@patch('synnefo.logic.rapi_pool.GanetiRapiClient') |
Also available in: Unified diff