diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-08-23 03:58:10 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-08-23 03:58:10 +0000 |
commit | aeeb696db2b1e4f92524c34d113c9aac26874dfc (patch) | |
tree | 5ded10af5326f88520216ec755b3e6a5d9636d81 /py/test/Ice/operations/Server.py | |
parent | fix for bug 447 - accept checkedCast(obj, ctx) (diff) | |
download | ice-aeeb696db2b1e4f92524c34d113c9aac26874dfc.tar.bz2 ice-aeeb696db2b1e4f92524c34d113c9aac26874dfc.tar.xz ice-aeeb696db2b1e4f92524c34d113c9aac26874dfc.zip |
Simplified operations test.
Diffstat (limited to 'py/test/Ice/operations/Server.py')
-rw-r--r-- | py/test/Ice/operations/Server.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/py/test/Ice/operations/Server.py b/py/test/Ice/operations/Server.py index 2887e381940..549559c605a 100644 --- a/py/test/Ice/operations/Server.py +++ b/py/test/Ice/operations/Server.py @@ -196,11 +196,23 @@ class MyDerivedClassI(Test.MyDerivedClass): def opDerived(self, current=None): pass +class TestCheckedCastI(Test.TestCheckedCast): + def __init__(self): + self.ctx = None + + def getContext(self, current): + return self.ctx; + + def ice_isA(self, s, current): + self.ctx = current.ctx + return Test.TestCheckedCast.ice_isA(self, s, current) + def run(args, communicator): communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12345 -t 10000") adapter = communicator.createObjectAdapter("TestAdapter") - object = MyDerivedClassI(adapter, Ice.stringToIdentity("test")) - adapter.add(object, Ice.stringToIdentity("test")) + id = Ice.stringToIdentity("test") + adapter.add(MyDerivedClassI(adapter, id), id) + adapter.add(TestCheckedCastI(), Ice.stringToIdentity("context")) adapter.activate() communicator.waitForShutdown() return True |