Add OrderHistory.first/last_order() methods

- get the `datetime` of the first or last order within a pixel
- unify some fixtures in `tests.forecasts.timify.conftest`
This commit is contained in:
Alexander Hess 2021-01-31 21:24:48 +01:00
commit 47ef1f8759
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
5 changed files with 173 additions and 52 deletions

View file

@ -67,4 +67,4 @@ def grid(city):
@pytest.fixture
def pixel(grid):
"""The `Pixel` in the lower-left corner of the `grid`."""
return db.Pixel(grid=grid, n_x=0, n_y=0)
return db.Pixel(id=1, grid=grid, n_x=0, n_y=0)