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 1
1
from datetime import datetime
2
2
3
3
import pytest
4
+ from freezegun import freeze_time
4
5
from requests .exceptions import HTTPError
5
6
6
7
from commercetools .platform import models
@@ -94,7 +95,7 @@ def test_cart_discount_update(old_client):
94
95
assert cart_discount .is_active is False
95
96
96
97
97
- @pytest . mark . freeze_time ("2021-03-01 12:34:56" )
98
+ @freeze_time ("2021-03-01 12:34:56" )
98
99
def test_cart_discount_set_valid_from (old_client ):
99
100
cart_discount = old_client .cart_discounts .create (
100
101
models .CartDiscountDraft (
@@ -118,7 +119,7 @@ def test_cart_discount_set_valid_from(old_client):
118
119
assert cart_discount .valid_from == datetime .now ()
119
120
120
121
121
- @pytest . mark . freeze_time ("2021-03-01 12:34:56" )
122
+ @freeze_time ("2021-03-01 12:34:56" )
122
123
def test_cart_discount_set_valid_until (old_client ):
123
124
cart_discount = old_client .cart_discounts .create (
124
125
models .CartDiscountDraft (
Original file line number Diff line number Diff line change 1
1
from datetime import datetime
2
2
3
3
import pytest
4
+ from freezegun import freeze_time
4
5
from requests .exceptions import HTTPError
5
6
6
7
from commercetools .platform import models
@@ -73,7 +74,7 @@ def test_discount_code_update(old_client):
73
74
assert discount_code .is_active is False
74
75
75
76
76
- @pytest . mark . freeze_time ("2021-03-01 12:34:56" )
77
+ @freeze_time ("2021-03-01 12:34:56" )
77
78
def test_discount_code_set_valid_from (old_client ):
78
79
discount_code = old_client .discount_codes .create (
79
80
models .DiscountCodeDraft (
@@ -95,7 +96,7 @@ def test_discount_code_set_valid_from(old_client):
95
96
assert discount_code .valid_from == datetime .now ()
96
97
97
98
98
- @pytest . mark . freeze_time ("2021-03-01 12:34:56" )
99
+ @freeze_time ("2021-03-01 12:34:56" )
99
100
def test_discount_code_set_valid_until (old_client ):
100
101
discount_code = old_client .discount_codes .create (
101
102
models .DiscountCodeDraft (
You can’t perform that action at this time.
0 commit comments