File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11from datetime import datetime
22
33import pytest
4+ from freezegun import freeze_time
45from requests .exceptions import HTTPError
56
67from commercetools .platform import models
@@ -94,7 +95,7 @@ def test_cart_discount_update(old_client):
9495 assert cart_discount .is_active is False
9596
9697
97- @pytest . mark . freeze_time ("2021-03-01 12:34:56" )
98+ @freeze_time ("2021-03-01 12:34:56" )
9899def test_cart_discount_set_valid_from (old_client ):
99100 cart_discount = old_client .cart_discounts .create (
100101 models .CartDiscountDraft (
@@ -118,7 +119,7 @@ def test_cart_discount_set_valid_from(old_client):
118119 assert cart_discount .valid_from == datetime .now ()
119120
120121
121- @pytest . mark . freeze_time ("2021-03-01 12:34:56" )
122+ @freeze_time ("2021-03-01 12:34:56" )
122123def test_cart_discount_set_valid_until (old_client ):
123124 cart_discount = old_client .cart_discounts .create (
124125 models .CartDiscountDraft (
Original file line number Diff line number Diff line change 11from datetime import datetime
22
33import pytest
4+ from freezegun import freeze_time
45from requests .exceptions import HTTPError
56
67from commercetools .platform import models
@@ -73,7 +74,7 @@ def test_discount_code_update(old_client):
7374 assert discount_code .is_active is False
7475
7576
76- @pytest . mark . freeze_time ("2021-03-01 12:34:56" )
77+ @freeze_time ("2021-03-01 12:34:56" )
7778def test_discount_code_set_valid_from (old_client ):
7879 discount_code = old_client .discount_codes .create (
7980 models .DiscountCodeDraft (
@@ -95,7 +96,7 @@ def test_discount_code_set_valid_from(old_client):
9596 assert discount_code .valid_from == datetime .now ()
9697
9798
98- @pytest . mark . freeze_time ("2021-03-01 12:34:56" )
99+ @freeze_time ("2021-03-01 12:34:56" )
99100def test_discount_code_set_valid_until (old_client ):
100101 discount_code = old_client .discount_codes .create (
101102 models .DiscountCodeDraft (
You can’t perform that action at this time.
0 commit comments