Private
Public Access
1
0

coverage info

This commit is contained in:
Sander Roosendaal
2021-04-14 17:42:12 +02:00
parent aa2315cb9b
commit 39a196b949
6 changed files with 232 additions and 425 deletions

View File

@@ -234,10 +234,6 @@ class PermissionsViewTests(TestCase):
mocked_get_video_data,
):
print()
print(view,'anonymous',permissions['anonymous'],permissions['is_staff'],permissions['dotest'])
print()
if permissions['anonymous'] and not permissions['is_staff'] and permissions['dotest']:
urlstotest = []
if permissions['workoutid']:
@@ -247,8 +243,6 @@ class PermissionsViewTests(TestCase):
url = reverse(view)
urlstotest.append(url)
print(view,'anonymous',urlstotest)
for url in urlstotest:
result = self.c.get(url)
self.assertEqual(result.status_code,permissions['anonymous_response'])
@@ -275,10 +269,6 @@ class PermissionsViewTests(TestCase):
mocked_get_video_data,
):
print()
print(view,'own')
print()
if permissions['own'] in plans and not permissions['is_staff'] and permissions['dotest']:
urlstotest = []
falseurlstotest = []
@@ -288,8 +278,6 @@ class PermissionsViewTests(TestCase):
memberuser = self.uplan
notuser = None
print(view,'own')
if permissions['own'] == 'basic':
thisuser = self.ubasic
memberuser = self.uplan
@@ -323,8 +311,6 @@ class PermissionsViewTests(TestCase):
url = reverse(view)
urlstotest.append(url)
print(view,'own',urlstotest,falseurlstotest,otheruserurls)
# test logged in as user who has permissions
for url in urlstotest:
login = self.c.login(username = thisuser['username'],password = thisuser['password'])
@@ -365,10 +351,6 @@ class PermissionsViewTests(TestCase):
mocked_get_video_data,
):
print()
print(view,'member')
print()
if permissions['member'] in plans and permissions['is_staff'] is False and permissions['dotest']:
urlstotest = []
falseurlstotest = []
@@ -378,8 +360,6 @@ class PermissionsViewTests(TestCase):
memberuser = self.uplan
notuser = None
print(view,'member')
if permissions['member'] == 'basic':
thisuser = self.ubasic
memberuser = self.uplan
@@ -414,8 +394,6 @@ class PermissionsViewTests(TestCase):
url = reverse(view)
urlstotest.append(url)
print('member',urlstotest,falseurlstotest,otheruserurls)
# test logged in as user who has permissions
for url in urlstotest:
login = self.c.login(username = thisuser['username'],password = thisuser['password'])
@@ -456,10 +434,6 @@ class PermissionsViewTests(TestCase):
mocked_get_video_data,
):
print()
print(view,'coachee')
print()
if permissions['coachee'] in plans and not permissions['is_staff'] and permissions['dotest']:
urlstotest = []
falseurlstotest = []
@@ -486,8 +460,6 @@ class PermissionsViewTests(TestCase):
url = reverse(view)
urlstotest.append(url)
print('coachee',urlstotest,falseurlstotest,otheruserurls)
# test logged in as user who has permissions
for url in urlstotest:
login = self.c.login(username = thisuser['username'],password = thisuser['password'])