mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-02 20:01:51 +02:00
Replace last instances of is_ongoing by is_open
This commit is contained in:
parent
59f3870c41
commit
59ad699edf
1 changed files with 6 additions and 6 deletions
|
@ -14,22 +14,22 @@ pytestmark = pytest.mark.django_db
|
||||||
class TestGroupedOrderModel:
|
class TestGroupedOrderModel:
|
||||||
"""Tests for Grouped orders model"""
|
"""Tests for Grouped orders model"""
|
||||||
|
|
||||||
def test_is_ongoing_with_ongoing_grouped_order(self):
|
def test_is_open_with_ongoing_grouped_order(self):
|
||||||
"""
|
"""
|
||||||
is_ongoing() returns True if the deadline is not crossed
|
is_open() returns True if the deadline is not crossed
|
||||||
"""
|
"""
|
||||||
deadline = timezone.now() + datetime.timedelta(days=10)
|
deadline = timezone.now() + datetime.timedelta(days=10)
|
||||||
|
|
||||||
ongoing_gr_order = GroupedOrder(deadline=deadline)
|
ongoing_gr_order = GroupedOrder(deadline=deadline)
|
||||||
assert ongoing_gr_order.is_ongoing()
|
assert ongoing_gr_order.is_open()
|
||||||
|
|
||||||
def test_is_ongoing_with_old_grouped_order(self):
|
def test_is_open_with_old_grouped_order(self):
|
||||||
"""
|
"""
|
||||||
is_ongoing() returns False if the deadline is crossed
|
is_open() returns False if the deadline is crossed
|
||||||
"""
|
"""
|
||||||
deadline = timezone.now() - datetime.timedelta(hours=1)
|
deadline = timezone.now() - datetime.timedelta(hours=1)
|
||||||
old_gr_order = GroupedOrder(deadline=deadline)
|
old_gr_order = GroupedOrder(deadline=deadline)
|
||||||
assert not old_gr_order.is_ongoing()
|
assert not old_gr_order.is_open()
|
||||||
|
|
||||||
def test_is_to_be_delivered_with_today_delivery(self):
|
def test_is_to_be_delivered_with_today_delivery(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue