Skip to content

Commit

Permalink
fix(tests): conform to constraint test and fix offset
Browse files Browse the repository at this point in the history
  • Loading branch information
zyv committed Apr 17, 2024
1 parent 4cd6e4f commit 0d1b950
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_current(self):
from_aerodrome=self.airport,
to_aerodrome=self.airport,
departure_time=datetime.now(tz=UTC) - timedelta(days=110 - i),
arrival_time=datetime.now(tz=UTC) - timedelta(days=110 - i),
arrival_time=datetime.now(tz=UTC) - timedelta(days=110 - i) + timedelta(seconds=1),
landings=1,
pilot=self.pilot,
)
Expand All @@ -60,6 +60,7 @@ def test_current(self):
currency.expires_in.total_seconds() / 60,
places=1,
)
self.assertEqual(datetime.now(tz=UTC).date() + timedelta(days=4), currency.expires_on)

self.assertEqual((datetime.now(tz=UTC) + timedelta(days=5)).date(), currency.expires_on)
self.assertEqual(CurrencyStatus.EXPIRING, currency.status)
self.assertEqual(1, currency.landings_to_renew)

0 comments on commit 0d1b950

Please sign in to comment.