Skip to content

predicate with date not allowed #128

Open
@davidweterings

Description

@davidweterings

Commercetools allows predicates like lastModifiedAt > "2021-05-01" but it gives a marshmallow validation error.

def test_orders_query_filter_single_date(commercetools_api, old_client):
    order = get_test_order()
    commercetools_api.orders.add_existing(order)
    where = [
        'createdAt >= "2019-10-15"',
    ]

    results = old_client.orders.query(where=where)
    assert results.total == 1

Probably have to handle/detect in testing/predicates.py 503 if it's a datetime and convert to a valid datetime

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions