Revision 7eae8fce snf-cyclades-app/synnefo/neutron/tests/api.py
b/snf-cyclades-app/synnefo/neutron/tests/api.py | ||
---|---|---|
7 | 7 |
|
8 | 8 |
NEUTRON_URL = get_service_path(cyclades_services, "neutron", "v2.0") |
9 | 9 |
NETWORKS_URL = join_urls(NEUTRON_URL, "networks/") |
10 |
SUBNETS_URL = join_urls(NEUTRON_URL, "subnets/") |
|
10 | 11 |
|
11 | 12 |
|
12 | 13 |
class NetworkTest(BaseAPITest): |
... | ... | |
23 | 24 |
self.assertEqual(code, 501) |
24 | 25 |
|
25 | 26 |
def test_get_unfound_network(self): |
26 |
url = join_urls(NETWORKS_URL,"123") |
|
27 |
url = join_urls(NETWORKS_URL, "123")
|
|
27 | 28 |
response = self.get(url) |
28 | 29 |
self.assertItemNotFound(response) |
29 | 30 |
|
30 | 31 |
def test_delete_unfound_network(self): |
31 |
url = join_urls(NETWORKS_URL,"123") |
|
32 |
url = join_urls(NETWORKS_URL, "123")
|
|
32 | 33 |
response = self.delete(url) |
33 | 34 |
self.assertItemNotFound(response) |
34 | 35 |
|
35 |
|
|
36 | 36 |
def marios(self): |
37 | 37 |
print "hello world" |
38 |
|
|
39 |
|
|
40 |
class SubnetTest(BaseAPITest): |
|
41 |
def test_list_subnets(self): |
|
42 |
'''Test Subnet list''' |
|
43 |
response = self.get(SUBNETS_URL) |
|
44 |
print response |
|
45 |
self.assertSuccess(response) |
|
46 |
subnets = json.loads(response.content) |
|
47 |
self.assertEqual(subnets, {'subnets': []}) |
Also available in: Unified diff