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)
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
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
def testNs(self): tests = Tests(ns="me") eNs = "me.tests".lower() assert tests._getNamespace() == eNs, "Got: %(NS)s" % {"NS":eNs}