8
8
from seedwork .domain .value_objects import UUID
9
9
10
10
11
+ @pytest .mark .unit
11
12
def test_listing_initial_price ():
12
13
seller = Seller (id = UUID .v4 ())
13
14
listing = Listing (
@@ -19,6 +20,7 @@ def test_listing_initial_price():
19
20
assert listing .winning_bid is None
20
21
21
22
23
+ @pytest .mark .unit
22
24
def test_place_one_bid ():
23
25
now = datetime .utcnow ()
24
26
seller = Seller (id = UUID .v4 ())
@@ -34,6 +36,7 @@ def test_place_one_bid():
34
36
assert listing .winning_bid == Bid (Money (20 ), bidder = bidder , placed_at = now )
35
37
36
38
39
+ @pytest .mark .unit
37
40
def test_place_two_bids ():
38
41
now = datetime .utcnow ()
39
42
seller = Seller (id = UUID .v4 ())
@@ -50,6 +53,7 @@ def test_place_two_bids():
50
53
assert listing .winning_bid == Bid (Money (30 ), bidder = bidder2 , placed_at = now )
51
54
52
55
56
+ @pytest .mark .unit
53
57
def test_place_two_bids_by_same_bidder ():
54
58
now = datetime .utcnow ()
55
59
seller = Seller (id = UUID .v4 ())
@@ -67,6 +71,7 @@ def test_place_two_bids_by_same_bidder():
67
71
assert listing .winning_bid == Bid (price = Money (30 ), bidder = bidder , placed_at = now )
68
72
69
73
74
+ @pytest .mark .unit
70
75
def test_cannot_place_bid_if_listing_ended ():
71
76
seller = Seller (id = UUID .v4 ())
72
77
bidder = Bidder (id = UUID .v4 ())
@@ -88,6 +93,7 @@ def test_cannot_place_bid_if_listing_ended():
88
93
listing .place_bid (bid )
89
94
90
95
96
+ @pytest .mark .unit
91
97
def test_retract_bid ():
92
98
seller = Seller (id = UUID .v4 ())
93
99
bidder = Bidder (id = UUID .v4 ())
@@ -107,6 +113,7 @@ def test_retract_bid():
107
113
listing .retract_bid_of (bidder = bidder )
108
114
109
115
116
+ @pytest .mark .unit
110
117
def test_cancel_listing ():
111
118
now = datetime .utcnow ()
112
119
seller = Seller (id = UUID .v4 ())
@@ -122,6 +129,7 @@ def test_cancel_listing():
122
129
assert listing .time_left_in_listing == timedelta ()
123
130
124
131
132
+ @pytest .mark .unit
125
133
def test_can_cancel_listing_with_bids ():
126
134
now = datetime .utcnow ()
127
135
seller = Seller (id = UUID .v4 ())
@@ -144,6 +152,7 @@ def test_can_cancel_listing_with_bids():
144
152
assert listing .time_left_in_listing == timedelta ()
145
153
146
154
155
+ @pytest .mark .unit
147
156
def test_cannot_cancel_listing_with_bids ():
148
157
now = datetime .utcnow ()
149
158
seller = Seller (id = UUID .v4 ())
0 commit comments