コード例 #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
ファイル: TestApiFactory.py プロジェクト: sys-git/epyrpc
 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
ファイル: TestApiFactory.py プロジェクト: sys-git/epyrpc
 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
ファイル: TestApiFactory.py プロジェクト: sys-git/epyrpc
 def testUnsupported(self):
     t = eApiType.UNSUPPORTED
     try:
         ApiFactory.get(t)
     except UnknownApiError, _e:
         assert True