Merge pull request #108 from levivm/develop
fixed tests in order to user permissions
This commit is contained in:
commit
aa88b9c57d
2 changed files with 3 additions and 0 deletions
|
@ -468,4 +468,5 @@ else:
|
|||
from .prod import *
|
||||
|
||||
|
||||
ANONYMOUS_USER_NAME = 'anonymous@ungleich.ch'
|
||||
GUARDIAN_GET_INIT_ANONYMOUS_USER = 'membership.models.get_anonymous_user_instance'
|
||||
|
|
|
@ -327,6 +327,7 @@ class VirtualMachineViewTest(BaseTestCase):
|
|||
|
||||
self.stripe_customer = mommy.make(StripeCustomer, user=self.customer)
|
||||
self.vm = mommy.make(VirtualMachinePlan)
|
||||
self.vm.assign_permissions(self.customer)
|
||||
self.order = mommy.make(HostingOrder, customer=self.stripe_customer, vm_plan=self.vm)
|
||||
self.url = reverse('hosting:virtual_machines', kwargs={'pk': self.vm.id})
|
||||
self.view = VirtualMachineView()
|
||||
|
@ -393,6 +394,7 @@ class OrderHostingDetailViewTest(BaseTestCase):
|
|||
|
||||
self.stripe_customer = mommy.make(StripeCustomer, user=self.customer)
|
||||
self.order = mommy.make(HostingOrder, customer=self.stripe_customer)
|
||||
self.order.assign_permissions(self.customer)
|
||||
self.url = reverse('hosting:orders', kwargs={'pk': self.order.id})
|
||||
self.view = OrdersHostingDetailView()
|
||||
self.expected_template = 'hosting/order_detail.html'
|
||||
|
|
Loading…
Reference in a new issue