Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/external/pdap/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async def sync_agencies(
headers=headers,
params={
"page": params.page,
"update_at": params.cutoff_date
"updated_at": params.cutoff_date
}
)
response_info = await self.access_manager.make_request(request_info)
Expand Down Expand Up @@ -198,7 +198,7 @@ async def sync_data_sources(
headers=headers,
params={
"page": params.page,
"update_at": params.cutoff_date
"updated_at": params.cutoff_date
}
)
response_info = await self.access_manager.make_request(request_info)
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import pytest
import time

from pendulum import tomorrow

from src.core.tasks.scheduled.sync.agency.dtos.parameters import AgencySyncParameters


Expand All @@ -18,4 +20,18 @@
print(response)

duration = end - start
print(f"Duration: {duration:.4f} seconds")
print(f"Duration: {duration:.4f} seconds")

@pytest.mark.asyncio
async def test_sync_agencies_cutoff(pdap_client_dev):

Check warning on line 26 in tests/manual/external/pdap/sync/test_sync_agencies.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] tests/manual/external/pdap/sync/test_sync_agencies.py#L26 <103>

Missing docstring in public function
Raw output
./tests/manual/external/pdap/sync/test_sync_agencies.py:26:1: D103 Missing docstring in public function

start = time.perf_counter()

Check warning on line 28 in tests/manual/external/pdap/sync/test_sync_agencies.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] tests/manual/external/pdap/sync/test_sync_agencies.py#L28 <841>

local variable 'start' is assigned to but never used
Raw output
./tests/manual/external/pdap/sync/test_sync_agencies.py:28:5: F841 local variable 'start' is assigned to but never used
response = await pdap_client_dev.sync_agencies(
params=AgencySyncParameters(
page=1,
cutoff_date=tomorrow()
)
)
end = time.perf_counter()

Check warning on line 35 in tests/manual/external/pdap/sync/test_sync_agencies.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] tests/manual/external/pdap/sync/test_sync_agencies.py#L35 <841>

local variable 'end' is assigned to but never used
Raw output
./tests/manual/external/pdap/sync/test_sync_agencies.py:35:5: F841 local variable 'end' is assigned to but never used
print(response)

Check warning on line 37 in tests/manual/external/pdap/sync/test_sync_agencies.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] tests/manual/external/pdap/sync/test_sync_agencies.py#L37 <391>

blank line at end of file
Raw output
./tests/manual/external/pdap/sync/test_sync_agencies.py:37:1: W391 blank line at end of file