pass first 2 bill tests
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
9bf0a99f6a
commit
db1a69561b
2 changed files with 18 additions and 13 deletions
|
|
@ -27,14 +27,7 @@ class ProductActivationTestCase(TestCase):
|
|||
'description': 'One chocolate bar'
|
||||
}
|
||||
|
||||
|
||||
def test_bill_one_time_order(self):
|
||||
one_time_price = 10
|
||||
recurring_price = 150
|
||||
description = "Test Product 1"
|
||||
|
||||
|
||||
order = Order.objects.create(
|
||||
self.one_time_order = Order.objects.create(
|
||||
owner=self.user,
|
||||
starting_date=self.order_meta[1]['starting_date'],
|
||||
ending_date=self.order_meta[1]['ending_date'],
|
||||
|
|
@ -44,15 +37,25 @@ class ProductActivationTestCase(TestCase):
|
|||
billing_address=self.billing_address)
|
||||
|
||||
|
||||
def test_bill_one_time_one_bill_record(self):
|
||||
"""
|
||||
Ensure there is only 1 bill record per order
|
||||
"""
|
||||
|
||||
bill = Bill.create_next_bill_for_user(self.user)
|
||||
|
||||
self.assertEqual(order.billrecord_set.count(), 1)
|
||||
self.assertEqual(self.one_time_order.billrecord_set.count(), 1)
|
||||
|
||||
def test_bill_sum(self):
|
||||
"""
|
||||
Ensure there is only 1 bill record per order
|
||||
"""
|
||||
|
||||
bill = Bill.create_next_bill_for_user(self.user)
|
||||
self.assertEqual(bill.sum, self.order_meta[1]['price'])
|
||||
|
||||
|
||||
|
||||
|
||||
# class NotABillingTC(TestCase):
|
||||
# #class BillingTestCase(TestCase):
|
||||
# def setUp(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue