~barry/ubuntu/precise/dbus-python/python3-from-upstream

« back to all changes in this revision

Viewing changes to test/test-client.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-06-26 10:28:30 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070626102830-6rh3gy4nvtt1c5z2
Tags: 0.82.0-1ubuntu1
* Merge with Debian; remaining changes:
  - Build a python-dbus-dbg package.
  - debian/rules:
    - Don't remove intermediate stamp files.
    - Don't use optimization for the debug build.
  - debian/python-dbus.postinst:
    - Also remove stale .py[co] files from 2.5 python directories

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
 
94
94
    def testInterfaceKeyword(self):
95
95
        #test dbus_interface parameter
96
 
        print self.remote_object.Echo("dbus_interface on Proxy test Passed", dbus_interface = "org.freedesktop.DBus.TestSuiteInterface")
97
 
        print self.iface.Echo("dbus_interface on Interface test Passed", dbus_interface = "org.freedesktop.DBus.TestSuiteInterface")
 
96
        print self.remote_object.Echo("dbus_interface on Proxy test Passed", dbus_interface = IFACE)
 
97
        print self.iface.Echo("dbus_interface on Interface test Passed", dbus_interface = IFACE)
98
98
        self.assert_(True)
99
99
 
100
100
    def testGetDBusMethod(self):
101
101
        self.assertEquals(self.iface.get_dbus_method('AcceptListOfByte')('\1\2\3'), [1,2,3])
102
 
        self.assertEquals(self.remote_object.get_dbus_method('AcceptListOfByte', dbus_interface='org.freedesktop.DBus.TestSuiteInterface')('\1\2\3'), [1,2,3])
 
102
        self.assertEquals(self.remote_object.get_dbus_method('AcceptListOfByte', dbus_interface=IFACE)('\1\2\3'), [1,2,3])
103
103
 
104
104
    def testCallingConventionOptions(self):
105
105
        self.assertEquals(self.iface.AcceptListOfByte('\1\2\3'), [1,2,3])
408
408
        self.assert_(iface.RemoveSelf())
409
409
        self.assert_(not self.iface.HasRemovableObject())
410
410
 
 
411
    def testFallbackObjectTrivial(self):
 
412
        obj = self.bus.get_object(NAME, OBJECT + '/Fallback')
 
413
        iface = dbus.Interface(obj, IFACE)
 
414
        path, unique_name = iface.TestPathAndConnKeywords()
 
415
        self.assertEquals(path, OBJECT + '/Fallback')
 
416
        #self.assertEquals(rel, '/Badger/Mushroom')
 
417
        self.assertEquals(unique_name, obj.bus_name)
 
418
 
 
419
    def testFallbackObject(self):
 
420
        obj = self.bus.get_object(NAME, OBJECT + '/Fallback/Badger/Mushroom')
 
421
        iface = dbus.Interface(obj, IFACE)
 
422
        path, unique_name = iface.TestPathAndConnKeywords()
 
423
        self.assertEquals(path, OBJECT + '/Fallback/Badger/Mushroom')
 
424
        #self.assertEquals(rel, '/Badger/Mushroom')
 
425
        self.assertEquals(unique_name, obj.bus_name)
 
426
 
411
427
""" Remove this for now
412
428
class TestDBusPythonToGLibBindings(unittest.TestCase):
413
429
    def setUp(self):