Skip to content

Sort extension tests failing #262

Closed
Closed
@jamesfisher-geo

Description

@jamesfisher-geo

Some tests of the sort extension are failing when I run make test on a clean pull from main. It looks like this is just due to a type error in the tests introduced in the update to 3.0.0a.

The first_item property needs to be converted to a datetime

another_item_date = first_item["properties"]["datetime"] - timedelta(days=1)

I get

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

To Reproduce

  1. git clone
  2. make test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions