Esempio n. 1
0
 def test(self):
     #    TODO: Fix once we know how Tests is implemented.
     t = Tests()
     tId = 123
     bSynchronous = True
     result = t._handler_queryTestPacks(tId, bSynchronous)
     assert isinstance(result, iApiTransportResponse)
     response = result.response()
     assert isinstance(response, iTestPacks)
Esempio n. 2
0
 def test(self):
     t = Tests()
     tId = 123
     bSynchronous = True
     testIds = [ATestId(234), ATestId(345), ATestId(456)]
     result = t._handler_queryTests(tId, bSynchronous, testIds)
     assert isinstance(result, iApiTransportResponse)
     response = result.response()
     assert isinstance(response, dict)
     #    Now check returned results:
     for key, value in response.items():
         assert isinstance(value, CachedTestDetails)
         tId = key.testId()
         found = None
         for i in testIds:
             testId = i.testId()
             if tId == testId:
                 found = i
                 break
         assert found
Esempio n. 3
0
 def testAbort(self):
     #    TODO: Fix once we know how Tests is implemented.
     t = Tests(ns="me")
     tId = 123
     bSynchronous = True
     testIds = [ATestId(456), ATestId(567), ATestId(678)]
     result = t._handler_abort(tId, bSynchronous, testIds)
     assert isinstance(result, iApiTransportResponse)
     response = result.response()
     assert isinstance(response, dict)
     for key, value in response.items():
         assert isinstance(value, iATest)
         tId = key.testId()
         #    Now find the item:
         found = None
         for i in testIds:
             testId = i.testId()
             if tId == testId:
                 found = i
                 break
         assert found
Esempio n. 4
0
 def testNs(self):
     tests = Tests(ns="me")
     eNs = "me.tests".lower()
     assert tests._getNamespace() == eNs, "Got: %(NS)s" % {"NS":eNs}