diff options
Diffstat (limited to 'py/test/Ice/servantLocator/TestI.py')
-rw-r--r-- | py/test/Ice/servantLocator/TestI.py | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/py/test/Ice/servantLocator/TestI.py b/py/test/Ice/servantLocator/TestI.py index 4a9eabf33c8..c5768071fc2 100644 --- a/py/test/Ice/servantLocator/TestI.py +++ b/py/test/Ice/servantLocator/TestI.py @@ -18,25 +18,25 @@ def test(b): class TestI(Test.TestIntf): def requestFailedException(self, current=None): - pass + pass def unknownUserException(self, current=None): - pass + pass def unknownLocalException(self, current=None): - pass + pass def unknownException(self, current=None): - pass + pass def localException(self, current=None): - pass + pass def userException(self, current=None): - pass + pass def pythonException(self, current=None): - pass + pass def shutdown(self, current=None): current.adapter.deactivate() @@ -48,7 +48,7 @@ class CookieI(Test.Cookie): class ServantLocatorI(Ice.ServantLocator): def __init__(self, category): self._deactivated = False - self._category = category + self._category = category def __del__(self): test(self._deactivated) @@ -56,25 +56,25 @@ class ServantLocatorI(Ice.ServantLocator): def locate(self, current): test(not self._deactivated) - test(current.id.category == self._category or self._category == "") - - if current.id.name == "unknown": - return None + test(current.id.category == self._category or self._category == "") + + if current.id.name == "unknown": + return None - test(current.id.name == "locate" or current.id.name == "finished") - if current.id.name == "locate": - self.exception(current) + test(current.id.name == "locate" or current.id.name == "finished") + if current.id.name == "locate": + self.exception(current) return (TestI(), CookieI()) def finished(self, current, servant, cookie): test(not self._deactivated) - test(current.id.category == self._category or self._category == "") - test(current.id.name == "locate" or current.id.name == "finished") - - if current.id.name == "finished": - self.exception(current) + test(current.id.category == self._category or self._category == "") + test(current.id.name == "locate" or current.id.name == "finished") + + if current.id.name == "finished": + self.exception(current) test(isinstance(cookie, Test.Cookie)) test(cookie.message() == 'blahblah') @@ -85,25 +85,25 @@ class ServantLocatorI(Ice.ServantLocator): self._deactivated = True def exception(self, current): - if current.operation == "requestFailedException": - raise Ice.ObjectNotExistException() - elif current.operation == "unknownUserException": - ex = Ice.UnknownUserException() - ex.unknown = "reason" - raise ex - elif current.operation == "unknownLocalException": - ex = Ice.UnknownLocalException() - ex.unknown = "reason" - raise ex - elif current.operation == "unknownException": - ex = Ice.UnknownException() - ex.unknown = "reason" - raise ex - elif current.operation == "userException": - raise Test.TestIntfUserException() - elif current.operation == "localException": - ex = Ice.SocketException() - ex.error = 0 - raise ex - elif current.operation == "pythonException": - raise RuntimeError("message") + if current.operation == "requestFailedException": + raise Ice.ObjectNotExistException() + elif current.operation == "unknownUserException": + ex = Ice.UnknownUserException() + ex.unknown = "reason" + raise ex + elif current.operation == "unknownLocalException": + ex = Ice.UnknownLocalException() + ex.unknown = "reason" + raise ex + elif current.operation == "unknownException": + ex = Ice.UnknownException() + ex.unknown = "reason" + raise ex + elif current.operation == "userException": + raise Test.TestIntfUserException() + elif current.operation == "localException": + ex = Ice.SocketException() + ex.error = 0 + raise ex + elif current.operation == "pythonException": + raise RuntimeError("message") |