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
ce3b4b7b
Verified
Commit
ce3b4b7b
authored
8 months ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
test: update radio settings fixture & fix tests
parent
6b54bf67
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
conftest.py
+4
-1
4 additions, 1 deletion
conftest.py
program/tests/test_day_schedule.py
+8
-10
8 additions, 10 deletions
program/tests/test_day_schedule.py
program/tests/test_playout.py
+8
-8
8 additions, 8 deletions
program/tests/test_playout.py
with
20 additions
and
19 deletions
conftest.py
+
4
−
1
View file @
ce3b4b7b
...
...
@@ -174,7 +174,10 @@ def fallback_show() -> Show:
@pytest.fixture
def
radio_settings
(
fallback_show
)
->
RadioSettings
:
return
RadioSettingsFactory
(
fallback_default_pool
=
"
Musikpool
"
,
fallback_show
=
fallback_show
,
station_name
=
"
Radio AURA
"
fallback_default_pool
=
"
fallback
"
,
fallback_show
=
fallback_show
,
pools
=
{
"
fallback
"
:
"
Station Fallback Pool
"
},
station_name
=
"
Radio AURA
"
,
)
...
...
This diff is collapsed.
Click to expand it.
program/tests/test_day_schedule.py
+
8
−
10
View file @
ce3b4b7b
...
...
@@ -44,9 +44,9 @@ def test_day_schedule(admin_api_client, api_client, once_rrule, show):
entry
=
response
.
json
()[
0
]
assert
not
entry
[
"
isVirtual
"
]
assert
entry
[
"
show
I
d
"
]
==
show
.
id
assert
entry
[
"
show
N
ame
"
]
==
show
.
name
assert
not
entry
[
"
timeslot
"
][
"
isVirtual
"
]
assert
entry
[
"
show
"
][
"
i
d
"
]
==
show
.
id
assert
entry
[
"
show
"
][
"
n
ame
"
]
==
show
.
name
def
test_day_schedule_include_virtual
(
...
...
@@ -65,11 +65,9 @@ def test_day_schedule_include_virtual(
assert
len
(
response
.
json
())
==
3
for
entry
in
response
.
json
():
if
entry
[
"
isVirtual
"
]:
print
(
"
V
"
)
assert
entry
[
"
showId
"
]
==
fallback_show
.
id
assert
entry
[
"
showName
"
]
==
fallback_show
.
name
if
entry
[
"
timeslot
"
][
"
isVirtual
"
]:
assert
entry
[
"
show
"
][
"
id
"
]
==
fallback_show
.
id
assert
entry
[
"
show
"
][
"
name
"
]
==
fallback_show
.
name
else
:
print
(
"
R
"
)
assert
entry
[
"
showId
"
]
==
show
.
id
assert
entry
[
"
showName
"
]
==
show
.
name
assert
entry
[
"
show
"
][
"
id
"
]
==
show
.
id
assert
entry
[
"
show
"
][
"
name
"
]
==
show
.
name
This diff is collapsed.
Click to expand it.
program/tests/test_playout.py
+
8
−
8
View file @
ce3b4b7b
...
...
@@ -42,9 +42,9 @@ def test_playout(admin_api_client, api_client, daily_rrule, show):
assert
len
(
response
.
json
())
==
7
for
entry
in
response
.
json
():
assert
not
entry
[
"
isVirtual
"
]
assert
entry
[
"
show
I
d
"
]
==
show
.
id
assert
entry
[
"
show
N
ame
"
]
==
show
.
name
assert
not
entry
[
"
timeslot
"
][
"
isVirtual
"
]
assert
entry
[
"
show
"
][
"
i
d
"
]
==
show
.
id
assert
entry
[
"
show
"
][
"
n
ame
"
]
==
show
.
name
def
test_playout_include_virtual
(
...
...
@@ -63,9 +63,9 @@ def test_playout_include_virtual(
assert
len
(
response
.
json
())
==
14
or
15
for
entry
in
response
.
json
():
if
entry
[
"
isVirtual
"
]:
assert
entry
[
"
show
I
d
"
]
==
fallback_show
.
id
assert
entry
[
"
show
N
ame
"
]
==
fallback_show
.
name
if
entry
[
"
timeslot
"
][
"
isVirtual
"
]:
assert
entry
[
"
show
"
][
"
i
d
"
]
==
fallback_show
.
id
assert
entry
[
"
show
"
][
"
n
ame
"
]
==
fallback_show
.
name
else
:
assert
entry
[
"
show
I
d
"
]
==
show
.
id
assert
entry
[
"
show
N
ame
"
]
==
show
.
name
assert
entry
[
"
show
"
][
"
i
d
"
]
==
show
.
id
assert
entry
[
"
show
"
][
"
n
ame
"
]
==
show
.
name
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