Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Harkamaljit Singh
tdt4242-base-group7
Commits
f3d67735
Commit
f3d67735
authored
Apr 19, 2021
by
harkamalsi
Browse files
Fixing syntax error
parent
ca6bfb3f
Pipeline
#129311
failed with stages
in 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
backend/secfit/workouts/tests.py
View file @
f3d67735
...
...
@@ -129,9 +129,9 @@ class TestPermissions(APITestCase):
request
=
APIRequestFactory
().
get
(
"/"
)
athlete
=
User
.
objects
.
get
(
username
=
"athlete"
)
workout
=
Workout
.
objects
.
get
(
name
=
"test1"
)
)
self
.
assertTrue
(
resp
)
def
test_IsCoachAndvisibleToCoach
(
self
):
request
=
APIRequestFactory
().
get
(
"/"
)
coach
=
User
.
objects
.
get
(
username
=
"coach"
)
...
...
@@ -179,10 +179,8 @@ class TestPermissions(APITestCase):
request
.
data
=
{
"workout"
:
"http://127.0.0.1:8000/api/workouts/1/"
}
has_perm
=
IsOwnerOfWorkout
.
has_permission
(
self
,
request
=
request
,
view
=
None
)
self
.
assertTrue
(
has_perm
)
def
test_IsWorkoutOwnerObj
(
self
):
request
=
APIRequestFactory
().
get
(
"/"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment