forked from factset/analyticsapi-engines-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_accounts_api.py
More file actions
22 lines (14 loc) · 803 Bytes
/
test_accounts_api.py
File metadata and controls
22 lines (14 loc) · 803 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.accounts_api import AccountsApi
from fds.analyticsapi.engines.model.account_directories_root import AccountDirectoriesRoot
from common_functions import CommonFunctions
import common_parameters
class TestAccountsApi(unittest.TestCase):
def setUp(self):
self.accounts_api = AccountsApi(CommonFunctions.build_api_client())
def test_get_account_list(self):
response = self.accounts_api.get_accounts(common_parameters.default_lookup_directory, _return_http_data_only=False)
self.assertEqual(response[1], 200, "Response code should be 200 - Success")
self.assertEqual(type(response[0]), AccountDirectoriesRoot, "Response should be of AccountDirectoriesRoot type")
if __name__ == '__main__':
unittest.main()