Commit 48c20061 authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos
Browse files

cyclades: Add a test for subnet creation

parent 228b7d1e
......@@ -196,8 +196,27 @@ class SubnetTest(BaseAPITest):
{"start": "", "end": ""}],
def test_create_subnet_with_gateway(self):
"""Test create a subnet with a gateway"""
test_net = mf.NetworkFactory()
request = {
'subnet': {
'cidr': '',
'ip_version': 4,
'gateway_ip': ''}
response =, test_net.userid,
json.dumps(request), "json")
resp = json.loads(response.content)['subnet']
self.assertEqual("", resp['gateway_ip'])
self.assertEqual([{"start": "", "end": ""},
{"start": "", "end": ""}],
def test_create_subnet_with_gateway_inside_of_ip_pool_range(self):
"""Test create a subnet with an IP pool outside of network range"""
"""Test create a subnet with a gateway IP inside the IP pool range"""
test_net = mf.NetworkFactory()
request = {
'subnet': {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment