Commit d2bbdf9d by Bach Dániel Committed by Guba Sándor

vm: test for Interface.create()

parent f87c1242
......@@ -2,9 +2,12 @@ from django.test import TestCase
from mock import Mock
from ..models import (
from ..models.instance import (
InstanceTemplate, Instance, pre_state_changed, post_state_changed
from import (
class TemplateTestCase(TestCase):
......@@ -51,3 +54,19 @@ class InstanceTestCase(TestCase):
assert mock.called
assert i.state == 'RUNNING'
class InterfaceTestCase(TestCase):
def test_interface_create(self):
from firewall.models import Vlan, Domain
from django.contrib.auth.models import User
owner = User()
i = Instance(id=10, owner=owner)
d = Domain(owner=owner)
v = Vlan(vid=55, network4='',
network6='2001::1/32', domain=d)
Interface.create(i, v, managed=True, owner=owner)
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 sign in to comment