Skip to content

Commit

Permalink
source-google-analytics-data-api: fix formatting (#27011)
Browse files Browse the repository at this point in the history
  • Loading branch information
alafanechere committed Jun 5, 2023
1 parent a858d1e commit 9099aa7
Showing 1 changed file with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

import pytest
from freezegun import freeze_time
from source_google_analytics_data_api.source import GoogleAnalyticsDataApiBaseStream, PAGE_SIZE
from source_google_analytics_data_api.source import PAGE_SIZE, GoogleAnalyticsDataApiBaseStream

from .utils import read_incremental


json_credentials = """
{
"type": "service_account",
Expand Down Expand Up @@ -90,10 +89,12 @@ def test_request_body_json(patch_base_class):
"dateRanges": [request_body_params["stream_slice"]],
"returnPropertyQuota": True,
"offset": str(0),
"limit": str(PAGE_SIZE)
"limit": str(PAGE_SIZE),
}

request_body_json = GoogleAnalyticsDataApiBaseStream(authenticator=MagicMock(), config=patch_base_class["config"]).request_body_json(**request_body_params)
request_body_json = GoogleAnalyticsDataApiBaseStream(authenticator=MagicMock(), config=patch_base_class["config"]).request_body_json(
**request_body_params
)
assert request_body_json == expected_body_json


Expand Down Expand Up @@ -315,38 +316,38 @@ def test_read_incremental(requests_mock):
"dimensionHeaders": [{"name": "date"}],
"metricHeaders": [{"name": "totalUsers", "type": "TYPE_INTEGER"}],
"rows": [{"dimensionValues": [{"value": "20221229"}], "metricValues": [{"value": "100"}]}],
"rowCount": 1
"rowCount": 1,
},
{
"dimensionHeaders": [{"name": "date"}],
"metricHeaders": [{"name": "totalUsers", "type": "TYPE_INTEGER"}],
"rows": [{"dimensionValues": [{"value": "20221230"}], "metricValues": [{"value": "110"}]}],
"rowCount": 1
"rowCount": 1,
},
{
"dimensionHeaders": [{"name": "date"}],
"metricHeaders": [{"name": "totalUsers", "type": "TYPE_INTEGER"}],
"rows": [{"dimensionValues": [{"value": "20221231"}], "metricValues": [{"value": "120"}]}],
"rowCount": 1
"rowCount": 1,
},
{
"dimensionHeaders": [{"name": "date"}],
"metricHeaders": [{"name": "totalUsers", "type": "TYPE_INTEGER"}],
"rows": [{"dimensionValues": [{"value": "20230101"}], "metricValues": [{"value": "130"}]}],
"rowCount": 1
"rowCount": 1,
},
{
"dimensionHeaders": [{"name": "date"}],
"metricHeaders": [{"name": "totalUsers", "type": "TYPE_INTEGER"}],
"rows": [{"dimensionValues": [{"value": "20230101"}], "metricValues": [{"value": "140"}]}],
"rowCount": 1
"rowCount": 1,
},
{
"dimensionHeaders": [{"name": "date"}],
"metricHeaders": [{"name": "totalUsers", "type": "TYPE_INTEGER"}],
"rows": [{"dimensionValues": [{"value": "20230102"}], "metricValues": [{"value": "150"}]}],
"rowCount": 1
}
"rowCount": 1,
},
]

requests_mock.register_uri(
Expand Down

0 comments on commit 9099aa7

Please sign in to comment.