Commit a3f3ca8c authored by Nico Schottelius's avatar Nico Schottelius

in the middle of restructering

parent 5d1eaaf0
Pipeline #1537 failed with stage
in 44 seconds
This diff is collapsed.
......@@ -5,7 +5,8 @@ from datetime import datetime, date, timedelta
from .models import *
from uncloud_service.models import GenericServiceProduct
class BillingTestCase(TestCase):
class NotABillingTC(TestCase):
#class BillingTestCase(TestCase):
def setUp(self):
self.user = get_user_model().objects.create(
username='jdoe',
......@@ -22,15 +23,16 @@ class BillingTestCase(TestCase):
description = "Test Product 1"
# Three months: full, full, partial.
starting_date = datetime.fromisoformat('2020-03-01')
ending_date = datetime.fromisoformat('2020-05-08')
# starting_date = datetime.fromisoformat('2020-03-01')
starting_date = datetime(2020,3,1)
ending_date = datetime(2020,5,8)
# Create order to be billed.
order = Order.objects.create(
owner=self.user,
starting_date=starting_date,
ending_date=ending_date,
recurring_period=RecurringPeriod.PER_MONTH,
recurring_period=RecurringPeriod.PER_30D,
recurring_price=recurring_price,
one_time_price=one_time_price,
description=description,
......@@ -67,7 +69,7 @@ class BillingTestCase(TestCase):
order = Order.objects.create(
owner=self.user,
starting_date=starting_date,
recurring_period=RecurringPeriod.PER_YEAR,
recurring_period=RecurringPeriod.PER_365D,
recurring_price=recurring_price,
one_time_price=one_time_price,
description=description,
......@@ -150,7 +152,7 @@ class ProductActivationTestCase(TestCase):
order = Order.objects.create(
owner=self.user,
starting_date=starting_date,
recurring_period=RecurringPeriod.PER_MONTH,
recurring_period=RecurringPeriod.PER_30D,
recurring_price=recurring_price,
one_time_price=one_time_price,
description=description,
......@@ -205,12 +207,12 @@ class BillingAddressTestCase(TestCase):
order_01 = Order.objects.create(
owner=self.user,
starting_date=starting_date,
recurring_period=RecurringPeriod.PER_MONTH,
recurring_period=RecurringPeriod.PER_30D,
billing_address=self.billing_address_01)
order_02 = Order.objects.create(
owner=self.user,
starting_date=starting_date,
recurring_period=RecurringPeriod.PER_MONTH,
recurring_period=RecurringPeriod.PER_30D,
billing_address=self.billing_address_01)
# We need a single bill since we work with a single address.
......@@ -225,12 +227,12 @@ class BillingAddressTestCase(TestCase):
order_01 = Order.objects.create(
owner=self.user,
starting_date=starting_date,
recurring_period=RecurringPeriod.PER_MONTH,
recurring_period=RecurringPeriod.PER_30D,
billing_address=self.billing_address_01)
order_02 = Order.objects.create(
owner=self.user,
starting_date=starting_date,
recurring_period=RecurringPeriod.PER_MONTH,
recurring_period=RecurringPeriod.PER_30D,
billing_address=self.billing_address_02)
# We need different bills since we work with different addresses.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment