Ejemplo n.º 1
0
 def test_call_signature(self):
     client = Client(self.url + "/call-signature",
                     key="key",
                     secret="secret",
                     timeout=5)
     result = client.call("test.add", 2, 3, offset=10)
     self.assertEqual(result, 15)
Ejemplo n.º 2
0
    def test_invalid_call_params(self):
        client = Client(self.url + "/call-signature",
                        key="key",
                        secret="secret",
                        timeout=5)

        client._make_api_call = mock.MagicMock(return_value="{}")

        result = client.call("test.add", 2, 3, offset=10)
        self.assertEqual(result, None)
Ejemplo n.º 3
0
 def test_call(self):
     client = Client(self.url + "/call", timeout=5)
     result = client.call("test.add", 2, 3, offset=10)
     self.assertEqual(result, 15)