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

Repair API sort tests #264

Merged
merged 3 commits into from
May 29, 2024
Merged

Repair API sort tests #264

merged 3 commits into from
May 29, 2024

Conversation

jamesfisher-gis
Copy link
Collaborator

@jamesfisher-gis jamesfisher-gis commented May 29, 2024

Related Issue(s):

Description:

Edit to four tests of the sort extension. The timezone Z character was not being included with the .replace command. So it was removed and Z is appended to the datetime string.

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable
  • Changes are added to the changelog

@jonhealy1
Copy link
Collaborator

Hi @jamesfisher-gis. So sorting is working as usual with the API - outside of the tests?

@jamesfisher-gis
Copy link
Collaborator Author

Yes. There is no issue with the sorting logic. The issue was that the tests had updated so that a datetime object was being subtracted from a datetime string yielding this error and a failed test., for example

FAILED api/test_api.py::test_app_sort_extension_get_asc - TypeError: unsupported operand type(s) for -: 'str' and 'datetime.timedelta'

I have updated the tests so that it always uses a datetime object

@jamesfisher-gis
Copy link
Collaborator Author

Are you able to reproduce the issue in #262?

@jonhealy1
Copy link
Collaborator

Yes I am getting the same test errors

Copy link
Collaborator

@jonhealy1 jonhealy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jonhealy1 jonhealy1 merged commit 1b350a2 into main May 29, 2024
5 checks passed
@jonhealy1 jonhealy1 deleted the fix/sort-test branch May 29, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants