"""Unit tests for the Top Metrics schema.""" from analytics.queries.top_metrics import TopMetricsSoundRecordings def test_valid_query_params(): """Ensure that params passed to TopMetricsSoundRecordings have correct types.""" query_params = { "table_name": "V_METRICS_BY_TRACK_COUNTRY_FEED_DISTRIBUTOR_ROLLUP", "upc": "195497640560", "only_daily_data": False, "only_weekly_data": False, "user_has_full_access": True, "isrc_country_ids": ["US", "IN"], "release_period_start": "2024-01-01", "release_period_end": "2024-02-01", "tiktok_creations_change_threshold": 0, "active_streams_change_threshold": -1, "label_manager_id": 123, "country_ids": ["US", "MX"], "artist_ids": [1, 2, 3], "global_participant_ids": ["06183d1d-7c5b-444b-87ef-6a9231378f0b"], "company_brands": ["9b36a627-4be9-4762-b790-5628676f5f90"], "parent_companies": ["f1594122-7f99-4916-b103-08b0444c7b46"], "service_tier": "f299fe6d-5d65-4ee6-8240-bc3466938c9c", "distributors": ["theorchard", "awal"], "order_by": "streams_7_days", "order_dir": "DESC", "limit": 25, "offset": 100, "transfer_product_ownership_enabled": False, "rollup_grain": False, "line_soundcloud_collection_as_active_enabled": False, "published_max_available_date_enabled": False, } q = TopMetricsSoundRecordings({**query_params}) for param, value in q.query_params.items(): assert value == query_params[param]