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
c57fb3a7
Verified
Commit
c57fb3a7
authored
4 months ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
test: add tests to set and clear the media description of an episode
parent
dc2a61cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
program/tests/test_episodes.py
+18
-0
18 additions, 0 deletions
program/tests/test_episodes.py
with
18 additions
and
0 deletions
program/tests/test_episodes.py
+
18
−
0
View file @
c57fb3a7
...
@@ -43,6 +43,7 @@ def user_with_episode_perms(request) -> User:
...
@@ -43,6 +43,7 @@ def user_with_episode_perms(request) -> User:
"
edit__episode__image
"
,
"
edit__episode__image
"
,
"
edit__episode__contributors
"
,
"
edit__episode__contributors
"
,
"
edit__episode__languages
"
,
"
edit__episode__languages
"
,
"
edit__episode__media_description
"
,
"
edit__episode__tags
"
,
"
edit__episode__tags
"
,
"
edit__episode__links
"
,
"
edit__episode__links
"
,
}
}
...
@@ -236,3 +237,20 @@ def test_episode_timeslot_ids_are_ordered_by_start_time(
...
@@ -236,3 +237,20 @@ def test_episode_timeslot_ids_are_ordered_by_start_time(
response
=
admin_api_client
.
get
(
url
(
episode
))
response
=
admin_api_client
.
get
(
url
(
episode
))
# timeslot ids must be in order of start time
# timeslot ids must be in order of start time
assert
response
.
json
()[
"
timeslotIds
"
]
==
[
first_ts
.
id
,
second_ts
.
id
,
third_ts
.
id
]
assert
response
.
json
()[
"
timeslotIds
"
]
==
[
first_ts
.
id
,
second_ts
.
id
,
third_ts
.
id
]
def
test_episode_set_media_description
(
api_client_episode_perms
,
_owned_show
):
episode
=
EpisodeFactory
.
create
(
show
=
_owned_show
)
update
=
{
"
mediaDescription
"
:
"
a media description
"
}
response
=
api_client_episode_perms
.
patch
(
url
(
episode
=
episode
),
data
=
update
)
assert
response
.
json
()[
"
mediaDescription
"
]
==
update
[
"
mediaDescription
"
]
def
test_episode_clear_media_description
(
api_client_episode_perms
,
_owned_show
):
episode
=
EpisodeFactory
.
create
(
show
=
_owned_show
)
response
=
api_client_episode_perms
.
patch
(
url
(
episode
=
episode
),
data
=
{
"
mediaDescription
"
:
""
})
assert
response
.
json
()[
"
mediaDescription
"
]
==
""
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