diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 4d1bd92e..6159af45 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -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' diff --git a/hosting/test_views.py b/hosting/test_views.py index 5e43db88..99bc0427 100644 --- a/hosting/test_views.py +++ b/hosting/test_views.py @@ -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'