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

Fixing errors in the logic of requesting measurements to the real server #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openaq/_async/models/measurements.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async def list(
sensors_id: int,
data: Union[Data, None] = None,
rollup: Union[Rollup, None] = None,
date_from: Union[datetime.datetime, str, None] = "2016-10-10",
date_from: Union[datetime.datetime, str, None] = "2016-10-10T00:00:00Z",
date_to: Union[datetime.datetime, str, None] = None,
page: int = 1,
limit: int = 1000,
Expand Down
2 changes: 1 addition & 1 deletion openaq/_sync/models/measurements.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def list(
sensors_id: int,
data: Union[Data, None] = None,
rollup: Union[Rollup, None] = None,
datetime_from: Union[datetime.datetime, str, None] = "2016-10-10",
datetime_from: Union[datetime.datetime, str, None] = "2016-10-10T00:00:00Z",
datetime_to: Union[datetime.datetime, str, None] = None,
page: int = 1,
limit: int = 1000,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/sync/test_sync_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_measurements_list_endpoints(
mock_response = Mock()
MeasurementsResponse.read_response = Mock(return_value=mock_response)
mock_client._get.return_value = mock_response
mock_params = {'page': 1, 'limit': 1000, 'datetime_from': '2016-10-10'}
mock_params = {'page': 1, 'limit': 1000, 'datetime_from': '2016-10-10T00:00:00Z'}
mocker.patch('openaq.shared.models.build_query_params', return_value=mock_params)
measurements.list(sensors_id=1, data=data, rollup=rollup)

Expand Down