Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
steering
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
steering
Commits
ed2393e9
Verified
Commit
ed2393e9
authored
4 months ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
test: add test to update & clear the default playlist id
parent
f9c9b425
No related branches found
No related tags found
1 merge request
!59
Add playlists
Pipeline
#8694
passed
4 months ago
Stage: check
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
program/tests/test_shows.py
+23
-0
23 additions, 0 deletions
program/tests/test_shows.py
with
23 additions
and
0 deletions
program/tests/test_shows.py
+
23
−
0
View file @
ed2393e9
...
@@ -176,3 +176,26 @@ def test_update_show_forbidden_for_common_user(
...
@@ -176,3 +176,26 @@ def test_update_show_forbidden_for_common_user(
response
=
common_api_client1
.
patch
(
url
(
show
),
data
=
update
,
format
=
"
json
"
)
response
=
common_api_client1
.
patch
(
url
(
show
),
data
=
update
,
format
=
"
json
"
)
assert
response
.
status_code
==
403
assert
response
.
status_code
==
403
def
test_update_default_playlist_id
(
admin_api_client
,
show
,
default_playlist
):
update
=
{
"
default_playlist_id
"
:
default_playlist
.
id
}
response
=
admin_api_client
.
patch
(
url
(
show
=
show
),
data
=
update
)
assert
response
.
status_code
==
200
assert
response
.
data
[
"
default_playlist_id
"
]
==
update
[
"
default_playlist_id
"
]
def
test_clear_default_playlist_id
(
admin_api_client
,
show
,
default_playlist
):
show
.
default_playlist
=
default_playlist
show
.
save
()
update
=
{
"
default_playlist_id
"
:
None
}
response
=
admin_api_client
.
patch
(
url
(
show
=
show
),
data
=
update
,
format
=
"
json
"
)
assert
response
.
status_code
==
200
assert
response
.
data
[
"
default_playlist_id
"
]
==
update
[
"
default_playlist_id
"
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment