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