fixing DomainBillingTest

This commit is contained in:
Cayo Puigdefabregas 2021-02-08 19:04:49 +01:00 committed by Santiago Lamora
parent a53b71bab1
commit 0633df114e

View file

@ -44,95 +44,95 @@ class DomainBillingTest(BaseTestCase):
account = self.create_account()
self.create_domain(account=account)
bills = account.orders.bill()
self.assertEqual(0, bills[0].get_total())
self.assertEqual(0, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill()
self.assertEqual(10, bills[0].get_total())
self.assertEqual(10, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill()
self.assertEqual(20, bills[0].get_total())
self.assertEqual(20, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill()
self.assertEqual(29, bills[0].get_total())
self.assertEqual(29, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill()
self.assertEqual(38, bills[0].get_total())
self.assertEqual(38, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill()
self.assertEqual(44, bills[0].get_total())
self.assertEqual(44, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill()
self.assertEqual(50, bills[0].get_total())
self.assertEqual(50, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill()
self.assertEqual(56, bills[0].get_total())
self.assertEqual(56, bills[0].total)
def test_domain_proforma(self):
self.create_domain_service()
account = self.create_account()
self.create_domain(account=account)
bills = account.orders.bill(proforma=True, new_open=True)
self.assertEqual(0, bills[0].get_total())
self.assertEqual(0, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(proforma=True, new_open=True)
self.assertEqual(10, bills[0].get_total())
self.assertEqual(10, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(proforma=True, new_open=True)
self.assertEqual(20, bills[0].get_total())
self.assertEqual(20, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(proforma=True, new_open=True)
self.assertEqual(29, bills[0].get_total())
self.assertEqual(29, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(proforma=True, new_open=True)
self.assertEqual(38, bills[0].get_total())
self.assertEqual(38, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(proforma=True, new_open=True)
self.assertEqual(44, bills[0].get_total())
self.assertEqual(44, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(proforma=True, new_open=True)
self.assertEqual(50, bills[0].get_total())
self.assertEqual(50, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(proforma=True, new_open=True)
self.assertEqual(56, bills[0].get_total())
self.assertEqual(56, bills[0].total)
def test_domain_cumulative(self):
self.create_domain_service()
account = self.create_account()
self.create_domain(account=account)
bills = account.orders.bill(proforma=True)
self.assertEqual(0, bills[0].get_total())
self.assertEqual(0, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(proforma=True)
self.assertEqual(10, bills[0].get_total())
self.assertEqual(10, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(proforma=True)
self.assertEqual(30, bills[0].get_total())
self.assertEqual(30, bills[0].total)
def test_domain_new_open(self):
self.create_domain_service()
account = self.create_account()
self.create_domain(account=account)
bills = account.orders.bill(new_open=True)
self.assertEqual(0, bills[0].get_total())
self.assertEqual(0, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(new_open=True)
self.assertEqual(10, bills[0].get_total())
self.assertEqual(10, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(new_open=True)
self.assertEqual(10, bills[0].get_total())
self.assertEqual(10, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(new_open=True)
self.assertEqual(9, bills[0].get_total())
self.assertEqual(9, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(new_open=True)
self.assertEqual(9, bills[0].get_total())
self.assertEqual(9, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(new_open=True)
self.assertEqual(6, bills[0].get_total())
self.assertEqual(6, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(new_open=True)
self.assertEqual(6, bills[0].get_total())
self.assertEqual(6, bills[0].total)
self.create_domain(account=account)
bills = account.orders.bill(new_open=True)
self.assertEqual(6, bills[0].get_total())
self.assertEqual(6, bills[0].total)