Skip to content

Commit

Permalink
add test for false outdated lock
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Nov 6, 2023
1 parent a36f781 commit 2213e3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ numpy
orjson
pytest
python-dateutil
time-machine
typing_extensions
7 changes: 7 additions & 0 deletions tests/test_neofoodclub.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from typing import Any, Dict, Optional

import pytest
import time_machine
from dateutil.tz import tzutc

from neofoodclub import Modifier, NeoFoodClub
from neofoodclub.errors import InvalidData
Expand Down Expand Up @@ -220,6 +222,11 @@ def test_outdated_lock(nfc: NeoFoodClub) -> None:
assert nfc.is_outdated_lock is True


@time_machine.travel(datetime.datetime(2021, 2, 16, 12, 0, 0, 0, tzinfo=tzutc()))
def test_outdated_lock_false(nfc: NeoFoodClub) -> None:
assert nfc.is_outdated_lock is False


def test_outdated_lock_none(nfc: NeoFoodClub) -> None:
data = nfc.to_dict()

Expand Down

0 comments on commit 2213e3c

Please sign in to comment.