def setUp(self): self.tenant = mommy.make('shared_schema_tenants.Tenant') self.user = User.objects.create_user( first_name='test', last_name='test', username='******', email='*****@*****.**', password='******') groups = create_default_tenant_groups() create_relationship(self.tenant, self.user, groups) self.params = { 'notify_users_by_email': False } self.view_url = reverse('shared_schema_tenants:tenant_settings_details', kwargs={'pk': self.tenant.pk}) self.client.force_authenticate(self.user)
def setUp(self): self.tenant = mommy.make('shared_schema_tenants.Tenant') self.user = User.objects.create_user( first_name='test', last_name='test', username='******', email='*****@*****.**', password='******') groups = create_default_tenant_groups() create_relationship(self.tenant, self.user, groups) self.tenant_site = mommy.make('shared_schema_tenants.TenantSite', tenant=self.tenant) self.params = { 'domain': 'sharedschematenants.com' } self.view_url = reverse('shared_schema_tenants:tenant_site_list') self.client.force_authenticate(self.user)
def setUp(self): self.tenant = Tenant.objects.create(name='test', slug='test') set_current_tenant(self.tenant.slug) self.user = User.objects.create_user( first_name='test', last_name='test', username='******', email='*****@*****.**', password='******') self.relationship = create_relationship(self.tenant, self.user, groups=create_default_tenant_groups())
def setUp(self): self.tenants = mommy.make('shared_schema_tenants.Tenant', _quantity=10) self.user = User.objects.create_user( first_name='test', last_name='test', username='******', email='*****@*****.**', password='******') groups = create_default_tenant_groups() create_relationship(self.tenants[0], self.user, groups) self.params = { 'name': 'test 2', 'slug': 'test-2', 'extra_data': { "logo": "https://www.google.com.br/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png", "is_non_profit": True, "number_of_employees": 7, }, } self.view_url = reverse('shared_schema_tenants:tenant_details') self.client.force_authenticate(self.user)
def setUp(self): self.tenant = mommy.make('shared_schema_tenants.Tenant') set_current_tenant(self.tenant.slug) self.user = User.objects.create_user( first_name='test', last_name='test', username='******', email='*****@*****.**', password='******') self.relationship = create_relationship(self.tenant, self.user, groups=create_default_tenant_groups()) self.tenant_site = mommy.make('shared_schema_tenants.TenantSite', tenant=self.tenant)