Revision 6de57f9c snf-cyclades-app/synnefo/neutron/tests/api.py
b/snf-cyclades-app/synnefo/neutron/tests/api.py | ||
---|---|---|
41 | 41 |
def test_list_subnets(self): |
42 | 42 |
'''Test Subnet list''' |
43 | 43 |
response = self.get(SUBNETS_URL) |
44 |
print response |
|
45 | 44 |
self.assertSuccess(response) |
46 | 45 |
subnets = json.loads(response.content) |
47 | 46 |
self.assertEqual(subnets, {'subnets': []}) |
47 |
|
|
48 |
def test_get_subnet(self): |
|
49 |
'''Test get info of a subnet''' |
|
50 |
url = join_urls(SUBNETS_URL, '42') |
|
51 |
response = self.get(url) |
|
52 |
self.assertSuccess(response) |
|
53 |
subnet = json.loads(response.content) |
|
54 |
self.assertEqual(subnet, {'subnet': []}) |
|
55 |
|
|
56 |
def test_get_subnet_404(self): |
|
57 |
'''Test get info of a subnet that doesn't exist''' |
|
58 |
url = join_urls(SUBNETS_URL, '52') |
|
59 |
response = self.get(url) |
|
60 |
self.assertItemNotFound(response) |
|
61 |
|
|
62 |
def test_subnet_delete_not_in_use(self): |
|
63 |
'''Test delete a subnet that's not in use''' |
|
64 |
url = join_urls(SUBNETS_URL, '42') |
|
65 |
response = self.get(url) |
|
66 |
self.assertItemNotFound(response) |
Also available in: Unified diff