-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_columns_statistics_api.py
More file actions
30 lines (23 loc) · 1.11 KB
/
test_columns_statistics_api.py
File metadata and controls
30 lines (23 loc) · 1.11 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
import unittest
from fds.analyticsapi.engines.api.column_statistics_api import ColumnStatisticsApi
from fds.analyticsapi.engines.model.column_statistic import ColumnStatistic
from fds.analyticsapi.engines.model.column_statistic_root import ColumnStatisticRoot
from common_functions import CommonFunctions
class TestColumnStatisticsApi(unittest.TestCase):
def setUp(self):
self.column_statistics_api = ColumnStatisticsApi(
CommonFunctions.build_api_client())
def test_get_column_statistics(self):
response = self.column_statistics_api.get_pa_column_statistics(
_return_http_data_only=False)
self.assertEqual(response[1], 200,
"Response code should be 200 - Success")
self.assertEqual(type(response[0]), ColumnStatisticRoot,
"Response should be of ColumnStatisticRoot type")
self.assertEqual(
type(response[0]['data'][list(response[0]['data'].keys())[0]]),
ColumnStatistic,
"Response should be of ColumnStatistic type"
)
if __name__ == '__main__':
unittest.main()