P5-4394 add framed-prints price formulas

This commit is contained in:
Martin
2019-10-31 14:16:22 +01:00
parent 0dd8d619b4
commit 95a264af99
5 changed files with 132 additions and 0 deletions
+18
View File
@@ -543,3 +543,21 @@ class TestPrice(unittest2.TestCase):
self.assertEqual(
250, inquiry_price(inquiry, inc_price_retouch=False, hanger=False)
)
def test_framed_print_price(self):
self.assertEqual(558, framed_print_price(sku="GLOBAL-CFP-12x12", market=sweden))
self.assertEqual(
569,
framed_print_price(
sku="GLOBAL-CFP-12x12", market=sweden, designer=designer_moomin
),
)
self.assertEqual(
528, framed_print_price(sku="GLOBAL-CFP-12x12", market=denmark)
)
def test_invalid_framed_print_code(self):
with self.assertRaises(ValueError) as context:
framed_print_price(sku="invalid", market=sweden)
self.assertTrue("Invalid SKU number" in str(context.exception))