示例#1
0
 def testSetValidIpc(self):
     api = TestManagement(ns=self.rootNs)
     api.ipc = self.ipc
     assert api.ipc == self.ipc
     #    Now check all sub-apis:
     for _api in api._apis:
         assert _api.ipc == self.ipc
示例#2
0
 def testSetInvalidIpc(self):
     api = TestManagement(ns=self.rootNs)
     try:
         api.ipc = object()
     except ApiParamError, e:
         assert e.item
示例#3
0
 def testNs(self):
     api = TestManagement(ns=self.rootNs, ipc=self.ipc)
     ns = api._getNamespace()
     assert ns == self.eNs, "Got: %(NS)s" % {"NS":ns}