|
|
|
@ -88,7 +88,7 @@ class CompensationViewTestCase(BaseViewTestCase):
|
|
|
|
|
client = Client()
|
|
|
|
|
client.login(username=self.superuser.username, password=self.superuser_pw)
|
|
|
|
|
self.superuser.groups.set([])
|
|
|
|
|
self.intervention.users.set([self.superuser])
|
|
|
|
|
self.intervention.share_with_list([self.superuser])
|
|
|
|
|
|
|
|
|
|
# Since the user has no groups, it does not matter that data has been shared. There SHOULD not be any difference
|
|
|
|
|
# to a user without access, since the important permissions are missing
|
|
|
|
@ -126,7 +126,7 @@ class CompensationViewTestCase(BaseViewTestCase):
|
|
|
|
|
client.login(username=self.superuser.username, password=self.superuser_pw)
|
|
|
|
|
self.superuser.groups.set([])
|
|
|
|
|
# Sharing is inherited by base intervention for compensation. Therefore configure the interventions share state
|
|
|
|
|
self.intervention.users.set([])
|
|
|
|
|
self.intervention.share_with_list([])
|
|
|
|
|
|
|
|
|
|
# Since the user has no groups, it does not matter that data is unshared. There SHOULD not be any difference
|
|
|
|
|
# to a user having shared access, since all important permissions are missing
|
|
|
|
@ -166,7 +166,7 @@ class CompensationViewTestCase(BaseViewTestCase):
|
|
|
|
|
group = self.groups.get(name=DEFAULT_GROUP)
|
|
|
|
|
self.superuser.groups.set([group])
|
|
|
|
|
# Sharing is inherited by base intervention for compensation. Therefore configure the interventions share state
|
|
|
|
|
self.intervention.users.set([self.superuser])
|
|
|
|
|
self.intervention.share_with_list([self.superuser])
|
|
|
|
|
|
|
|
|
|
success_urls = [
|
|
|
|
|
self.index_url,
|
|
|
|
@ -200,7 +200,7 @@ class CompensationViewTestCase(BaseViewTestCase):
|
|
|
|
|
group = self.groups.get(name=DEFAULT_GROUP)
|
|
|
|
|
self.superuser.groups.set([group])
|
|
|
|
|
# Sharing is inherited by base intervention for compensation. Therefore configure the interventions share state
|
|
|
|
|
self.intervention.users.set([])
|
|
|
|
|
self.intervention.share_with_list([])
|
|
|
|
|
|
|
|
|
|
success_urls = [
|
|
|
|
|
self.index_url,
|
|
|
|
@ -271,7 +271,7 @@ class EcoAccountViewTestCase(CompensationViewTestCase):
|
|
|
|
|
client = Client()
|
|
|
|
|
client.login(username=self.superuser.username, password=self.superuser_pw)
|
|
|
|
|
self.superuser.groups.set([])
|
|
|
|
|
self.eco_account.users.set([self.superuser])
|
|
|
|
|
self.eco_account.share_with_list([self.superuser])
|
|
|
|
|
|
|
|
|
|
# Since the user has no groups, it does not matter that data has been shared. There SHOULD not be any difference
|
|
|
|
|
# to a user without access, since the important permissions are missing
|
|
|
|
@ -308,7 +308,7 @@ class EcoAccountViewTestCase(CompensationViewTestCase):
|
|
|
|
|
client = Client()
|
|
|
|
|
client.login(username=self.superuser.username, password=self.superuser_pw)
|
|
|
|
|
self.superuser.groups.set([])
|
|
|
|
|
self.eco_account.users.set([])
|
|
|
|
|
self.eco_account.share_with_list([])
|
|
|
|
|
|
|
|
|
|
# Since the user has no groups, it does not matter that data is unshared. There SHOULD not be any difference
|
|
|
|
|
# to a user having shared access, since all important permissions are missing
|
|
|
|
@ -348,7 +348,7 @@ class EcoAccountViewTestCase(CompensationViewTestCase):
|
|
|
|
|
group = self.groups.get(name=DEFAULT_GROUP)
|
|
|
|
|
self.superuser.groups.set([group])
|
|
|
|
|
# Sharing is inherited by base intervention for compensation. Therefore configure the interventions share state
|
|
|
|
|
self.eco_account.users.set([self.superuser])
|
|
|
|
|
self.eco_account.share_with_list([self.superuser])
|
|
|
|
|
|
|
|
|
|
success_urls = [
|
|
|
|
|
self.index_url,
|
|
|
|
@ -381,7 +381,7 @@ class EcoAccountViewTestCase(CompensationViewTestCase):
|
|
|
|
|
client.login(username=self.superuser.username, password=self.superuser_pw)
|
|
|
|
|
group = self.groups.get(name=DEFAULT_GROUP)
|
|
|
|
|
self.superuser.groups.set([group])
|
|
|
|
|
self.eco_account.users.set([])
|
|
|
|
|
self.eco_account.share_with_list([])
|
|
|
|
|
|
|
|
|
|
success_urls = [
|
|
|
|
|
self.index_url,
|
|
|
|
|