def test_transform_no_value_keys(self): data_point = _DATA_POINTS[1] value_keys = [] self.assertEqual( [], optimized_metric_big_query_view_exporter.get_row_values( data_point, value_keys))
def test_transform_happy_path_multi_value(self): data_point = {**_DATA_POINTS[1], 'total_population': 752} value_keys = ['total_population', 'total_revocations'] expected = [752, 68] self.assertEqual( expected, optimized_metric_big_query_view_exporter.get_row_values( data_point, value_keys))
def test_transform_happy_path_single_value(self): data_point = _DATA_POINTS[1] value_keys = ['total_revocations'] expected = [data_point['total_revocations']] self.assertEqual( expected, optimized_metric_big_query_view_exporter.get_row_values( data_point, value_keys))
def test_transform_happy_path_multi_value(self) -> None: data_point: Dict[str, Any] = { **_DATA_POINTS[1], "total_population": 752 } value_keys = ["total_population", "total_revocations"] expected = [752, 68] self.assertEqual( expected, optimized_metric_big_query_view_exporter.get_row_values( data_point, value_keys), )