예제 #1
0
 def testInvalidType(self):
     t = eApiType.EO_V1 + "hello.world!"
     assert not eApiType.isValid(t)
     try:
         ApiFactory.get(t)
     except ApiParamError, e:
         assert e.item == t
         assert eApiType in e.allowedTypes
         assert len(e.allowedTypes) == 1
예제 #2
0
 def testInvalidType(self):
     t = eApiType.EO_V1 + "hello.world!"
     assert not eApiType.isValid(t)
     try:
         ApiFactory.get(t)
     except ApiParamError, e:
         assert e.item == t
         assert eApiType in e.allowedTypes
         assert len(e.allowedTypes) == 1
예제 #3
0
 def testValid(self):
     t = eApiType.EO_V1
     assert eApiType.isValid(t)
     api_ = ApiFactory.get(t)
     self.apis.append(api_)
     assert isinstance(api_, iApi)
     t = eApiType.EO_V1__HANDLER
     assert eApiType.isValid(t)
     api_ = ApiFactory.get(t)
     self.apis.append(api_)
     assert isinstance(api_, iApi)
예제 #4
0
 def testValid(self):
     t = eApiType.EO_V1
     assert eApiType.isValid(t)
     api_ = ApiFactory.get(t)
     self.apis.append(api_)
     assert isinstance(api_, iApi)
     t = eApiType.EO_V1__HANDLER
     assert eApiType.isValid(t)
     api_ = ApiFactory.get(t)
     self.apis.append(api_)
     assert isinstance(api_, iApi)
예제 #5
0
 def testUnsupported(self):
     t = eApiType.UNSUPPORTED
     try:
         ApiFactory.get(t)
     except UnknownApiError, _e:
         assert True
예제 #6
0
 def testUnsupported(self):
     t = eApiType.UNSUPPORTED
     try:
         ApiFactory.get(t)
     except UnknownApiError, _e:
         assert True