def test_get_api(self):
        obj = DummyObject()
        rpc_object = ExposedObject(obj, ["a"])
        api = rpc_object.get_api()

        self.assertTrue("class" in api)
        self.assertEqual(api["class"], type(obj).__name__)

        self.assertTrue("methods" in api)
        self.assertEqual(set(api["methods"]), {":api", "a:set", "a:get"})
Exemplo n.º 2
0
    def test_get_api(self):
        obj = DummyObject()
        rpc_object = ExposedObject(obj, ['a'])
        api = rpc_object.get_api()

        self.assertTrue('class' in api)
        self.assertEqual(api['class'], type(obj).__name__)

        self.assertTrue('methods' in api)
        self.assertEqual(set(api['methods']), {':api', 'a:set', 'a:get'})