def test_quota(): client = VideoAPI('api_key') client.allowed_parts = {'test_key': 10, 'test_key2': 4, 'test_key3': 6} assert client.calculate_quota(('test_key2', 'test_key3')) == 10
def test_query_parameters_validation(resource_filter, parts, optional_params, expected_exception): client = VideoAPI('api_key') with pytest.raises(expected_exception): client.digest_request_params(resource_filter, parts, optional_params)