88from seedwork .domain .value_objects import UUID
99
1010
11+ @pytest .mark .unit
1112def test_listing_initial_price ():
1213 seller = Seller (id = UUID .v4 ())
1314 listing = Listing (
@@ -19,6 +20,7 @@ def test_listing_initial_price():
1920 assert listing .winning_bid is None
2021
2122
23+ @pytest .mark .unit
2224def test_place_one_bid ():
2325 now = datetime .utcnow ()
2426 seller = Seller (id = UUID .v4 ())
@@ -34,6 +36,7 @@ def test_place_one_bid():
3436 assert listing .winning_bid == Bid (Money (20 ), bidder = bidder , placed_at = now )
3537
3638
39+ @pytest .mark .unit
3740def test_place_two_bids ():
3841 now = datetime .utcnow ()
3942 seller = Seller (id = UUID .v4 ())
@@ -50,6 +53,7 @@ def test_place_two_bids():
5053 assert listing .winning_bid == Bid (Money (30 ), bidder = bidder2 , placed_at = now )
5154
5255
56+ @pytest .mark .unit
5357def test_place_two_bids_by_same_bidder ():
5458 now = datetime .utcnow ()
5559 seller = Seller (id = UUID .v4 ())
@@ -67,6 +71,7 @@ def test_place_two_bids_by_same_bidder():
6771 assert listing .winning_bid == Bid (price = Money (30 ), bidder = bidder , placed_at = now )
6872
6973
74+ @pytest .mark .unit
7075def test_cannot_place_bid_if_listing_ended ():
7176 seller = Seller (id = UUID .v4 ())
7277 bidder = Bidder (id = UUID .v4 ())
@@ -88,6 +93,7 @@ def test_cannot_place_bid_if_listing_ended():
8893 listing .place_bid (bid )
8994
9095
96+ @pytest .mark .unit
9197def test_retract_bid ():
9298 seller = Seller (id = UUID .v4 ())
9399 bidder = Bidder (id = UUID .v4 ())
@@ -107,6 +113,7 @@ def test_retract_bid():
107113 listing .retract_bid_of (bidder = bidder )
108114
109115
116+ @pytest .mark .unit
110117def test_cancel_listing ():
111118 now = datetime .utcnow ()
112119 seller = Seller (id = UUID .v4 ())
@@ -122,6 +129,7 @@ def test_cancel_listing():
122129 assert listing .time_left_in_listing == timedelta ()
123130
124131
132+ @pytest .mark .unit
125133def test_can_cancel_listing_with_bids ():
126134 now = datetime .utcnow ()
127135 seller = Seller (id = UUID .v4 ())
@@ -144,6 +152,7 @@ def test_can_cancel_listing_with_bids():
144152 assert listing .time_left_in_listing == timedelta ()
145153
146154
155+ @pytest .mark .unit
147156def test_cannot_cancel_listing_with_bids ():
148157 now = datetime .utcnow ()
149158 seller = Seller (id = UUID .v4 ())
0 commit comments