コード例 #1
0
ファイル: test_host.py プロジェクト: germangirl/python-oca
 def test_disable(self):
     self.client.call = Mock(return_value='')
     h = Host(self.xml, self.client)
     assert h.disable() is None
コード例 #2
0
ファイル: test_host.py プロジェクト: germangirl/python-oca
 def test_repr(self):
     h = Host(self.xml, self.client)
     assert h.__repr__() == '<oca.Host("dummyhost")>'
コード例 #3
0
ファイル: test_host.py プロジェクト: germangirl/python-oca
 def test_allocate(self):
     self.client.call = Mock(return_value=7)
     host_id = Host.allocate(self.client, 'host', 'im_xen',
                            'vmm_xen', 'tm_nfs')
     assert host_id == 7