import unittest from pyapd import ctl_client, config class TestCtlClient(unittest.TestCase): def setUp(self): self.config = config.Config('tests/data/test_config.yaml') def test_cmd_ping(self): ping = ctl_client.Ping() cmd = ping.get_command() self.assertEqual(cmd, {"command": "ping"}) def test_cmd_add_object(self): obj = { "id": "http://example.org/123456", "type": "object", } add_object = ctl_client.AddObject() cmd = add_object.get_command(obj) self.assertEqual(cmd['command'], 'add_object') self.assertEqual(cmd['obj'], obj)