

def test_product_adjustments(self):
    p1 = self.product.unit_price
    self.assertEqual(p1, Decimal('20.00'))
    signals.satchmo_price_query.connect(five_off)
    p2 = p1.product.unit_price
    self.assertEqual(p2, Decimal('15.00'))
    adj = get_product_quantity_adjustments(self.product, qty=1)
    self.assertEqual(len(adj.adjustments), 1)
    a = adj.adjustments[0]
    self.assertEqual(a.key, 'half')
    self.assertEqual(a.amount, Decimal(5))
    signals.satchmo_price_query.disconnect(five_off)

dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/product/tests.py PriceAdjustmentTest.test_product_adjustments/VarMisuse@41/57 `self`->`p1`