P5-5362 remove russian market
This commit is contained in:
@@ -30,10 +30,6 @@ eu = market.from_territory("EU")
|
||||
eu.price_adjustments = 1.13
|
||||
eu.exchange_rate = 0.100000
|
||||
|
||||
russia = market.from_territory("RU")
|
||||
russia.price_adjustments = 1
|
||||
russia.exchange_rate = 0.100000 # russia uses EUR
|
||||
|
||||
designer = DesignerFactory()
|
||||
designer.pricepremium_wallpaper = 17.647
|
||||
designer.pricepremium_canvas = 8
|
||||
@@ -42,7 +38,6 @@ designer.pricepremium_framed_print = 13
|
||||
|
||||
|
||||
reseller = ContractCustomerFactory(pricepremium=15)
|
||||
piterra = ContractCustomerFactory(pricepremium=36.029411)
|
||||
|
||||
designer_moomin = DesignerFactory()
|
||||
designer_moomin.pricepremium_wallpaper = 2
|
||||
@@ -82,12 +77,13 @@ class TestPrice(unittest2.TestCase):
|
||||
),
|
||||
)
|
||||
inquiry = Inquiry(pricepremium=36.029411)
|
||||
|
||||
self.assertEqual(
|
||||
44,
|
||||
42,
|
||||
wallpaper_m2_price(
|
||||
material=standard_wallpaper,
|
||||
market=russia,
|
||||
reseller=piterra,
|
||||
market=eu,
|
||||
reseller=reseller,
|
||||
inquiry=inquiry,
|
||||
inc_vat=False,
|
||||
),
|
||||
@@ -328,7 +324,7 @@ class TestPrice(unittest2.TestCase):
|
||||
self.assertEqual(
|
||||
780, canvas_frame_price(width=100, height=100, market=sweden, inc_vat=True)
|
||||
)
|
||||
self.assertEqual(62, canvas_frame_price(width=100, height=100, market=russia))
|
||||
self.assertEqual(88, canvas_frame_price(width=100, height=100, market=eu))
|
||||
self.assertEqual(
|
||||
936, canvas_frame_price(500, 500, market=sweden, inc_vat=False)
|
||||
)
|
||||
@@ -412,32 +408,6 @@ class TestPrice(unittest2.TestCase):
|
||||
250, inquiry.local_price_retouch(rounded=True, inc_vat=True)
|
||||
)
|
||||
|
||||
def test_wallpaper_piterra_inquiry_price(self):
|
||||
product = Product(designer=None)
|
||||
with mock.patch.object(Inquiry, "market", russia):
|
||||
inquiry = Inquiry(
|
||||
product_group="photo-wallpaper",
|
||||
territory="RU",
|
||||
width=150,
|
||||
height=211,
|
||||
dealer_store=piterra,
|
||||
pricepremium=36.029411,
|
||||
material=standard_wallpaper,
|
||||
product=product,
|
||||
)
|
||||
|
||||
self.assertEqual(138, inquiry_price(inquiry, inc_price_retouch=False))
|
||||
self.assertEqual(
|
||||
152,
|
||||
inquiry_price(
|
||||
inquiry, inc_price_retouch=False, material=premium_wallpaper
|
||||
),
|
||||
)
|
||||
# test set reseller store to None to calculate inquiry price without reseller price premium
|
||||
self.assertEqual(
|
||||
102, inquiry_price(inquiry, inc_price_retouch=False, reseller=None)
|
||||
)
|
||||
|
||||
def test_canvas_custom_inquiry_price(self):
|
||||
with mock.patch.object(Inquiry, "market", sweden):
|
||||
inquiry = Inquiry(
|
||||
@@ -457,24 +427,6 @@ class TestPrice(unittest2.TestCase):
|
||||
840, inquiry_price(inquiry, inc_price_retouch=False, framed=False)
|
||||
)
|
||||
|
||||
def test_canvas_piterra_inquiry_price(self):
|
||||
with mock.patch.object(Inquiry, "market", russia):
|
||||
inquiry = Inquiry(
|
||||
product_group="canvas",
|
||||
territory="RU",
|
||||
width=100,
|
||||
height=100,
|
||||
framed=True,
|
||||
dealer_store=piterra,
|
||||
pricepremium=0,
|
||||
material=standard_canvas,
|
||||
)
|
||||
|
||||
# note: site currently calculates this as €150 which is wrong because
|
||||
# it does not add dealer_store.pricepremium to the frame price
|
||||
self.assertEqual(131, inquiry_price(inquiry))
|
||||
self.assertEqual(91, inquiry_price(inquiry, framed=False))
|
||||
|
||||
def test_package_price(self):
|
||||
self.assertEqual(150, package_price("canvas", 150, 40, market=us))
|
||||
self.assertEqual(0, package_price("canvas", 150, 40, market=sweden))
|
||||
@@ -545,7 +497,7 @@ class TestPrice(unittest2.TestCase):
|
||||
self.assertEqual(
|
||||
528, framed_print_price(sku="GLOBAL-CFP-12x12", market=denmark)
|
||||
)
|
||||
self.assertEqual(113, framed_print_price(sku="GLOBAL-CFP-28x40", market=russia))
|
||||
self.assertEqual(159, framed_print_price(sku="GLOBAL-CFP-28x40", market=eu))
|
||||
self.assertEqual(208, framed_print_price(sku="GLOBAL-CFP-28x40", market=us))
|
||||
|
||||
def test_invalid_framed_print_code(self):
|
||||
|
||||
Reference in New Issue
Block a user