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
3ae86ae5
Verified
Commit
3ae86ae5
authored
8 months ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
test: fix playout tests
parent
b01c9bf7
No related branches found
No related tags found
1 merge request
!54
fix(program-generation): fix undefined behaviour around start and end query parameters
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
program/tests/test_playout.py
+13
-12
13 additions, 12 deletions
program/tests/test_playout.py
with
13 additions
and
12 deletions
program/tests/test_playout.py
+
13
−
12
View file @
3ae86ae5
...
@@ -51,9 +51,10 @@ def test_playout(admin_api_client, api_client, daily_rrule, show):
...
@@ -51,9 +51,10 @@ def test_playout(admin_api_client, api_client, daily_rrule, show):
response
=
api_client
.
get
(
url
())
response
=
api_client
.
get
(
url
())
assert
response
.
status_code
==
200
assert
response
.
status_code
==
200
assert
len
(
response
.
json
())
==
1
assert
len
(
response
.
json
())
==
2
assert_entry
(
response
.
json
()[
0
],
show
)
for
entry
in
response
.
json
():
assert_entry
(
entry
,
show
)
def
test_playout_one_week
(
admin_api_client
,
api_client
,
daily_rrule
,
show
):
def
test_playout_one_week
(
admin_api_client
,
api_client
,
daily_rrule
,
show
):
...
@@ -86,14 +87,14 @@ def test_playout_include_virtual(
...
@@ -86,14 +87,14 @@ def test_playout_include_virtual(
assert
response
.
status_code
==
200
assert
response
.
status_code
==
200
assert
len
(
response
.
json
())
==
3
assert
len
(
response
.
json
())
==
3
virtual_
entry1
,
entry
,
virtual_entry2
=
response
.
json
()
entry1
,
virtual_
entry
,
entry2
=
response
.
json
()
assert_
virtual_entry
(
virtual_entry1
,
fallback_
show
)
assert_
entry
(
entry1
,
show
)
assert_
entry
(
entry
,
show
)
assert_
virtual_entry
(
virtual_entry
,
fallback_
show
)
assert_
virtual_entry
(
virtual_
entry
2
,
fallback_
show
)
assert_
entry
(
entry
1
,
show
)
assert
virtual_
entry1
[
"
end
"
]
==
entry
[
"
start
"
]
assert
entry1
[
"
end
"
]
==
virtual_
entry
[
"
start
"
]
assert
entry
[
"
end
"
]
==
virtual_
entry2
[
"
start
"
]
assert
virtual_
entry
[
"
end
"
]
==
entry2
[
"
start
"
]
def
test_playout_one_week_include_virtual
(
def
test_playout_one_week_include_virtual
(
...
@@ -118,11 +119,11 @@ def test_playout_one_week_include_virtual(
...
@@ -118,11 +119,11 @@ def test_playout_one_week_include_virtual(
entries
=
response
.
json
()
entries
=
response
.
json
()
for
virtual_entry
in
entries
[
0
::
2
]:
for
entry
in
entries
[
0
::
2
]:
assert_virtual_entry
(
virtual_entry
,
fallback_show
)
for
entry
in
entries
[
1
::
2
]:
assert_entry
(
entry
,
show
)
assert_entry
(
entry
,
show
)
for
virtual_entry
in
entries
[
1
::
2
]:
assert_virtual_entry
(
virtual_entry
,
fallback_show
)
for
entry1
,
entry2
in
pairwise
(
entries
):
for
entry1
,
entry2
in
pairwise
(
entries
):
assert
entry1
[
"
end
"
]
==
entry2
[
"
start
"
]
assert
entry1
[
"
end
"
]
==
entry2
[
"
start
"
]
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