class OrderTestCase(TestCase): def create_fixtures(self): self.order = Order() self.order.order_subtotal = Decimal('10') self.order.order_total = Decimal('10') self.order.amount_payed = Decimal('0') self.order.shipping_cost = Decimal('0') self.order.shipping_name = 'toto' self.order.shipping_address = 'address' self.order.shipping_address2 = 'address2' self.order.shipping_zip_code = 'zip' self.order.shipping_state = 'state' self.order.shipping_country = 'country' self.order.billing_name = 'toto' self.order.billing_address = 'address' self.order.billing_address2 = 'address2' self.order.billing_zip_code = 'zip' self.order.billing_state = 'state' self.order.billing_country = 'country' self.order.save() def test_01_order_is_completed_works(self): self.create_fixtures() ret = self.order.is_completed() self.assertNotEqual(ret, Order.COMPLETED) def test_02_is_payed_works(self): self.create_fixtures() ret = self.order.is_payed() self.assertEqual(ret, False)
class OrderTestCase(TestCase): def setUp(self): self.order = Order() self.order.order_subtotal = Decimal("10") self.order.order_total = Decimal("10") self.order.shipping_cost = Decimal("0") self.order.shipping_name = "toto" self.order.shipping_address = "address" self.order.shipping_address2 = "address2" self.order.shipping_zip_code = "zip" self.order.shipping_state = "state" self.order.shipping_country = "country" self.order.billing_name = "toto" self.order.billing_address = "address" self.order.billing_address2 = "address2" self.order.billing_zip_code = "zip" self.order.billing_state = "state" self.order.billing_country = "country" self.order.save() def test_order_is_completed_works(self): ret = self.order.is_completed() self.assertNotEqual(ret, Order.COMPLETED) def test_is_payed_works(self): ret = self.order.is_payed() self.assertEqual(ret, False)
class OrderTestCase(TestCase): def setUp(self): self.order = Order() self.order.order_subtotal = Decimal('10') self.order.order_total = Decimal('10') self.order.shipping_cost = Decimal('0') self.order.shipping_address_text = 'shipping address example' self.order.billing_address_text = 'billing address example' self.order.save() def test_order_is_completed_works(self): ret = self.order.is_completed() self.assertNotEqual(ret, Order.COMPLETED) def test_is_payed_works(self): ret = self.order.is_payed() self.assertEqual(ret, False)