Revision d58d0327 snf-cyclades-app/synnefo/api/tests/networks.py
b/snf-cyclades-app/synnefo/api/tests/networks.py | ||
---|---|---|
214 | 214 |
response = self.put(url, test_net.userid, json.dumps(request), 'json') |
215 | 215 |
self.assertFault(response, 403, 'forbidden') |
216 | 216 |
|
217 |
def test_rename_network_invalid_name(self): |
|
218 |
test_net = dbmf.NetworkFactory(name="foo") |
|
219 |
url = join_urls(NETWORKS_URL, str(test_net.id)) |
|
220 |
request = {'network': {'name': 'a' * 500}} |
|
221 |
response = self.put(url, test_net.userid, json.dumps(request), 'json') |
|
222 |
self.assertEqual(response.status_code, 400) |
|
223 |
|
|
217 | 224 |
def test_method_not_allowed(self, *args): |
218 | 225 |
# /networks/ allows only POST, GET |
219 | 226 |
response = self.put(NETWORKS_URL, '', '') |
Also available in: Unified diff