Exemple #1
0
    def test_perform_request_with_config_without_user_id(self):
        MockServer.reset()
        req = EobotRequest()
        req.set_base_url('http://*****:*****@example.com",
                                      password="******",
                                      token=None)

        result = perform_request("BTC",
                                 0.05,
                                 "wallet-bitcoin",
                                 config="tsaw2",
                                 request=req.clone())
        self.assertTrue(result)
Exemple #2
0
    def test_perform_request(self):
        MockServer.reset()
        req = EobotRequest()
        req.set_base_url('http://*****:*****@example.com",
                               password="******",
                               token=None)

        result = perform_request("BTC",
                                 0.1,
                                 "bitcoin-wallet",
                                 request=req.clone())
        self.assertTrue(result)
Exemple #3
0
 def test_perform_request_with_invalid_request(self):
     with self.assertRaises(ValueError):
         # noinspection PyTypeChecker
         perform_request("BTC", 0.11, "bitcoin-wallet", request={})
Exemple #4
0
 def test_perform_request_with_invalid_wallet(self):
     with self.assertRaises(ValueError):
         # noinspection PyTypeChecker
         perform_request("BTC", 0.1, 456)
Exemple #5
0
 def test_perform_request_with_invalid_coin(self):
     with self.assertRaises(ValueError):
         # noinspection PyTypeChecker
         perform_request(123, 0.1, "bitcoin-wallet")
Exemple #6
0
 def test_perform_request_without_arguments(self):
     with self.assertRaises(TypeError):
         # noinspection PyArgumentList
         perform_request()