@@ -16,7 +16,7 @@ def random_id():
1616 return uuid .uuid4 ().hex [:10 ]
1717
1818
19- def test_can_allocate_to_warehouse_stock ():
19+ def test_can_allocate_to_stock ():
2020 sku = random_id ()
2121 order = [
2222 OrderLine (sku = sku , quantity = 10 ),
@@ -25,7 +25,7 @@ def test_can_allocate_to_warehouse_stock():
2525
2626 allocate (order , stock , shipments = [])
2727
28- assert order [0 ].allocation == 'warehouse '
28+ assert order [0 ].allocation == 'STOCK '
2929
3030
3131def test_can_allocate_to_shipment ():
@@ -74,7 +74,7 @@ def test_can_allocate_to_correct_shipment():
7474 assert order [0 ].allocation == shipment2 .id
7575
7676
77- def test_allocates_to_warehouse_stock_in_preference_to_shipment ():
77+ def test_allocates_to_stock_in_preference_to_shipment ():
7878 sku = random_id ()
7979 order = [
8080 OrderLine (sku = sku , quantity = 10 ),
@@ -86,7 +86,7 @@ def test_allocates_to_warehouse_stock_in_preference_to_shipment():
8686
8787 allocate (order , stock , shipments = [shipment ])
8888
89- assert order [0 ].allocation == 'warehouse '
89+ assert order [0 ].allocation == 'STOCK '
9090
9191
9292def test_can_allocate_multiple_lines_to_wh ():
@@ -101,8 +101,8 @@ def test_can_allocate_multiple_lines_to_wh():
101101 ]
102102
103103 allocate (order , stock , shipments = [])
104- assert order [0 ].allocation == 'warehouse '
105- assert order [1 ].allocation == 'warehouse '
104+ assert order [0 ].allocation == 'STOCK '
105+ assert order [1 ].allocation == 'STOCK '
106106
107107
108108def test_can_allocate_multiple_lines_to_shipment ():
@@ -135,7 +135,7 @@ def test_can_allocate_to_both():
135135
136136 allocate (order , stock , shipments = [shipment ])
137137
138- assert order [0 ].allocation == 'warehouse '
138+ assert order [0 ].allocation == 'STOCK '
139139 assert order [1 ].allocation == shipment .id
140140
141141
@@ -161,6 +161,6 @@ def test_can_allocate_to_both_preferring_stock():
161161
162162 assert order [0 ].allocation == shipment .id
163163 assert order [1 ].allocation == shipment .id
164- assert order [2 ].allocation == 'warehouse '
165- assert order [3 ].allocation == 'warehouse '
164+ assert order [2 ].allocation == 'STOCK '
165+ assert order [3 ].allocation == 'STOCK '
166166
0 commit comments