-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_currencies_api.py
More file actions
22 lines (16 loc) · 932 Bytes
/
Copy pathtest_currencies_api.py
File metadata and controls
22 lines (16 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import unittest
from fds.analyticsapi.engines.api.currencies_api import CurrenciesApi
from fds.analyticsapi.engines.models.currency import Currency
from common_functions import CommonFunctions
class TestCurrenciesApi(unittest.TestCase):
def setUp(self):
self.currencies_api = CurrenciesApi(CommonFunctions.build_api_client())
def test_get_all_currencies(self):
response = self.currencies_api.get_pa_currencies_with_http_info()
currency_code = list(response[0].keys())[0]
self.assertEqual(response[1], 200, "Response should be 200 - Success")
self.assertEqual(type(response[0]), dict, "Response should be of Dictionary type.")
self.assertEqual(type(response[0][currency_code]), Currency, "Response should be of Currency type.")
self.assertGreater(len(response[0]), 0, "Response result should not be an empty list.")
if __name__ == '__main__':
unittest.main()