def test_unpublish(self): self.client.call = Mock(return_value='') h = VirtualNetwork(self.xml, self.client) assert h.unpublish() is None
def test_repr(self): h = VirtualNetwork(self.xml, self.client) assert h.__repr__() == '<oca.VirtualNetwork("Red LAN")>'
def test_allocate(self): self.client.call = Mock(return_value=2) assert VirtualNetwork.allocate(self.client, VN_TEMPLATE) == 2