Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

discount_tests.py 673B

12345678910111213141516171819202122
  1. from decimal import Decimal as D
  2. from django.test import TestCase
  3. from nose.plugins.attrib import attr
  4. from oscar.apps.shipping.methods import Free, FixedPrice
  5. from oscar.apps.shipping.models import OrderAndItemCharges
  6. @attr('shipping')
  7. class TestStandardMethods(TestCase):
  8. def setUp(self):
  9. self.non_discount_methods = [
  10. Free(),
  11. FixedPrice(D('10.00'), D('10.00')),
  12. OrderAndItemCharges(price_per_order=D('5.00'),
  13. price_per_item=D('1.00'))]
  14. def test_have_is_discounted_property(self):
  15. for method in self.non_discount_methods:
  16. self.assertFalse(method.is_discounted)