Skip to content

Conversation

@jamesfisher-geo
Copy link
Collaborator

@jamesfisher-geo jamesfisher-geo 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-geo
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-geo
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
@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.

3 participants