@dbus.service.method('test.helloservice')
def hello(self):
    return 'Hello World!'


class BaseTestCase(unittest.TestCase):

    def setUp(self):
        env = os.environ.copy()
self.p = subprocess.Popen(['python', './dbus_practice.py', 'server'], env=env)
time.sleep(1)
How to write a functional test for a DBUS service written in Python?