[pay] make sample products more modular
This commit is contained in:
parent
4d5ca58b2a
commit
7b83efe995
2 changed files with 43 additions and 4 deletions
|
|
@ -327,6 +327,38 @@ class BillTestCase(TestCase):
|
|||
|
||||
self.assertEqual(len(bills), 2)
|
||||
|
||||
|
||||
class ModifyProductTestCase(TestCase):
|
||||
def setUp(self):
|
||||
self.user = get_user_model().objects.create(
|
||||
username='random_user',
|
||||
email='jane.random@domain.tld')
|
||||
|
||||
self.ba = BillingAddress.objects.create(
|
||||
owner=self.user,
|
||||
organization = 'Test org',
|
||||
street="unknown",
|
||||
city="unknown",
|
||||
postal_code="somewhere else",
|
||||
active=False)
|
||||
|
||||
def test_user_no_address(self):
|
||||
"""
|
||||
Raise an error, when there is no address
|
||||
"""
|
||||
|
||||
|
||||
self.assertRaises(uncloud_pay.models.BillingAddress.DoesNotExist,
|
||||
BillingAddress.get_address_for,
|
||||
self.user)
|
||||
|
||||
def test_user_only_inactive_address(self):
|
||||
"""
|
||||
Raise an error, when there is no active address
|
||||
"""
|
||||
|
||||
|
||||
|
||||
# class NotABillingTC(TestCase):
|
||||
# #class BillingTestCase(TestCase):
|
||||
# def setUp(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue