diff --git a/eco_counter/tests/test_api.py b/eco_counter/tests/test_api.py index 8f0afc7bb..9e7fc2ce7 100644 --- a/eco_counter/tests/test_api.py +++ b/eco_counter/tests/test_api.py @@ -3,6 +3,7 @@ import pytest from rest_framework.reverse import reverse +from .conftest import TEST_TIMESTAMP from .constants import TEST_EC_STATION_NAME @@ -271,6 +272,7 @@ def test__station(api_client, stations, year_datas): assert response.status_code == 200 assert response.json()["results"][0]["name"] == TEST_EC_STATION_NAME assert response.json()["results"][0]["sensor_types"] == ["at"] + assert response.json()["results"][0]["data_from_year"] == TEST_TIMESTAMP.year # Test retrieving station by data type url = reverse("eco_counter:stations-list") + "?data_type=a" response = api_client.get(url)