Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tests for Supermetrics #1059

Open
angelika233 opened this issue Sep 26, 2024 · 0 comments
Open

Improve tests for Supermetrics #1059

angelika233 opened this issue Sep 26, 2024 · 0 comments
Labels
2.0 backlog Backlog for logic issues in connectors after migration 2.0 viadot 2.0 enhancement New feature or request

Comments

@angelika233
Copy link
Contributor

angelika233 commented Sep 26, 2024

Check te return type in /unit/test_supermetrics.py (should be a list, not dict?)
#1054 (comment)

columns = supermetrics._get_col_names_google_analytics(mock_response)
assert columns == {"ga:date": "2023-01-01", "ga:sessions": 100}

Check the response format in /unit/test_supermetrics.py, it might be pivoted
#1054 (comment)

mock_response = {
        "meta": {
            "query": {
                "fields": [
                    {"field_name": "ga:date", "field_split": "column"},
                    {"field_name": "ga:sessions", "field_split": "row"}
                ]
            }
        },
        "data": [{"ga:date1": "2023-01-01", "ga:date2": "2024-01-01", "ga:sessions": 100}]
    }
@mgardzinski mgardzinski added the 2.0 backlog Backlog for logic issues in connectors after migration label Sep 26, 2024
@trymzet trymzet added 2.0 viadot 2.0 enhancement New feature or request labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 backlog Backlog for logic issues in connectors after migration 2.0 viadot 2.0 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants