Skip to content

Commit 0f38030

Browse files
Update subnet_tests.py
1 parent b168484 commit 0f38030

File tree

1 file changed

+3
-31
lines changed

1 file changed

+3
-31
lines changed

tests/CLI/modules/subnet_tests.py

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,10 @@ class SubnetTests(testing.TestCase):
1717

1818
def test_detail(self):
1919
result = self.run_command(['subnet', 'detail', '1234'])
20-
20+
subnet = json.loads(result.output)
2121
self.assert_no_fail(result)
22-
self.assertEqual(
23-
{
24-
'id': 1234,
25-
'identifier': '1.2.3.4/26',
26-
'subnet type': 'ADDITIONAL_PRIMARY',
27-
'network space': 'PUBLIC',
28-
'gateway': '1.2.3.254',
29-
'broadcast': '1.2.3.255',
30-
'datacenter': 'dal10',
31-
'vs': [
32-
{
33-
'hostname': 'hostname0',
34-
'domain': 'sl.test',
35-
'public_ip': '1.2.3.10',
36-
'private_ip': '10.0.1.2'
37-
}
38-
],
39-
'hardware': None,
40-
'usable ips': 22,
41-
'note': 'test note',
42-
'tags': [
43-
'subnet: test tag'
44-
],
45-
'ipAddresses': {
46-
'123456': '16.26.26.25',
47-
'123457': '16.26.26.26'},
48-
'hardware': 'none',
49-
'usable ips': 22
50-
},
51-
json.loads(result.output))
22+
self.assertEqual(subnet.get('id'), 1234)
23+
self.assertEqual(subnet.get('identifier'),'1.2.3.4/26')
5224

5325
def test_list(self):
5426
result = self.run_command(['subnet', 'list'])

0 commit comments

Comments
 (0)