-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_frequencies_api.py
More file actions
41 lines (33 loc) · 2.07 KB
/
Copy pathtest_frequencies_api.py
File metadata and controls
41 lines (33 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import unittest
from fds.analyticsapi.engines.api.frequencies_api import FrequenciesApi
from fds.analyticsapi.engines.models.frequency import Frequency
from common_functions import CommonFunctions
class TestFrequenciesApi(unittest.TestCase):
def setUp(self):
self.frequencies_api = FrequenciesApi(CommonFunctions.build_api_client())
def test_get_pa_frequencies(self):
response = self.frequencies_api.get_pa_frequencies_with_http_info()
self.assertEqual(response[1], 200, "Response should be 200 - Success")
self.assertEqual(type(response[0]), dict, "Response should be of dictionary type.")
frequencies = list(response[0].keys())
first_key = frequencies[0]
self.assertEqual(type(response[0][first_key]), Frequency, "Response should be of Frequency type.")
self.assertGreater(len(frequencies), 0, "Response result should not be an empty list.")
def test_get_spar_frequencies(self):
response = self.frequencies_api.get_spar_frequencies_with_http_info()
self.assertEqual(response[1], 200, "Response should be 200 - Success")
self.assertEqual(type(response[0]), dict, "Response should be of dictionary type.")
frequencies = list(response[0].keys())
first_key = frequencies[0]
self.assertEqual(type(response[0][first_key]), Frequency, "Response should be of Frequency type.")
self.assertGreater(len(frequencies), 0, "Response result should not be an empty list.")
def test_get_vault_frequencies(self):
response = self.frequencies_api.get_vault_frequencies_with_http_info()
self.assertEqual(response[1], 200, "Response should be 200 - Success")
self.assertEqual(type(response[0]), dict, "Response should be of dictionary type.")
frequencies = list(response[0].keys())
first_key = frequencies[0]
self.assertEqual(type(response[0][first_key]), Frequency, "Response should be of Frequency type.")
self.assertGreater(len(frequencies), 0, "Response result should not be an empty list.")
if __name__ == '__main__':
unittest.main()