Usage statistics calculator relies on $dateTrunc query in the aggregation pipeline for segregating jobs. This feature was added in mongodb 5.0 and is not currently present in the mongomock implementation.
Consider adding a custom command-line argument to pytest that allows switching to a real database during tests.
See: pytest_addoption
Usage statistics calculator relies on
$dateTrunc
query in the aggregation pipeline for segregating jobs. This feature was added in mongodb 5.0 and is not currently present in the mongomock implementation. Consider adding a custom command-line argument to pytest that allows switching to a real database during tests. See: pytest_addoption