Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
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
engine
Commits
9e275b0f
Commit
9e275b0f
authored
1 year ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
test: update per domain changes
parent
08ea8605
No related branches found
No related tags found
1 merge request
!35
ORM-less scheduling
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_domain.py
+11
-11
11 additions, 11 deletions
tests/test_domain.py
with
11 additions
and
11 deletions
tests/test_domain.py
+
11
−
11
View file @
9e275b0f
...
@@ -57,7 +57,7 @@ class TestDomain(unittest.TestCase):
...
@@ -57,7 +57,7 @@ class TestDomain(unittest.TestCase):
id
=
333
,
repetition_id
=
888
,
start
=
1675463003
,
end
=
1675466003
,
show
=
show
,
episode
=
episode
id
=
333
,
repetition_id
=
888
,
start
=
1675463003
,
end
=
1675466003
,
show
=
show
,
episode
=
episode
)
)
ts
.
set_playlists
(
Playlist
(),
Playlist
(),
Playlist
())
ts
.
set_playlists
(
Playlist
(
1
),
Playlist
(
2
),
Playlist
(
3
))
def
test_timeslot_to_string
(
self
):
def
test_timeslot_to_string
(
self
):
print
(
self
.
_testMethodName
)
print
(
self
.
_testMethodName
)
...
@@ -77,7 +77,7 @@ class TestDomain(unittest.TestCase):
...
@@ -77,7 +77,7 @@ class TestDomain(unittest.TestCase):
def
test_playlist_init
(
self
):
def
test_playlist_init
(
self
):
print
(
self
.
_testMethodName
)
print
(
self
.
_testMethodName
)
pl
=
Playlist
()
pl
=
Playlist
(
1
)
pl
.
id
:
333
pl
.
id
:
333
pl
.
timeslot
:
Timeslot
()
pl
.
timeslot
:
Timeslot
()
...
@@ -90,9 +90,9 @@ class TestDomain(unittest.TestCase):
...
@@ -90,9 +90,9 @@ class TestDomain(unittest.TestCase):
id
=
333
,
repetition_id
=
888
,
start
=
1675463003
,
end
=
1675466003
,
show
=
None
,
episode
=
None
id
=
333
,
repetition_id
=
888
,
start
=
1675463003
,
end
=
1675466003
,
show
=
None
,
episode
=
None
)
)
pl_timeslot
=
Playlist
()
pl_timeslot
=
Playlist
(
1
)
pl_schedule
=
Playlist
()
pl_schedule
=
Playlist
(
2
)
pl_show
=
Playlist
()
pl_show
=
Playlist
(
3
)
ts
.
set_playlists
(
pl_timeslot
,
None
,
None
)
ts
.
set_playlists
(
pl_timeslot
,
None
,
None
)
ts
.
set_playlists
(
None
,
pl_schedule
,
None
)
ts
.
set_playlists
(
None
,
pl_schedule
,
None
)
...
@@ -108,13 +108,13 @@ class TestDomain(unittest.TestCase):
...
@@ -108,13 +108,13 @@ class TestDomain(unittest.TestCase):
def
test_playlist_duration_zero
(
self
):
def
test_playlist_duration_zero
(
self
):
print
(
self
.
_testMethodName
)
print
(
self
.
_testMethodName
)
pl
=
Playlist
()
pl
=
Playlist
(
1
)
self
.
assertEqual
(
0
,
pl
.
get_duration
())
self
.
assertEqual
(
0
,
pl
.
get_duration
())
def
test_playlist_add_items
(
self
):
def
test_playlist_add_items
(
self
):
print
(
self
.
_testMethodName
)
print
(
self
.
_testMethodName
)
pl
=
Playlist
()
pl
=
Playlist
(
1
)
e1
=
PlaylistItem
(
"
file1.flac
"
,
2
,
100
,
PlaylistItem
.
Metadata
(
"
a1
"
,
"
b1
"
,
"
c1
"
))
e1
=
PlaylistItem
(
"
file1.flac
"
,
2
,
100
,
PlaylistItem
.
Metadata
(
"
a1
"
,
"
b1
"
,
"
c1
"
))
e2
=
PlaylistItem
(
"
file2.flac
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
))
e2
=
PlaylistItem
(
"
file2.flac
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
))
e3
=
PlaylistItem
(
"
file3.flac
"
,
5
,
100
,
PlaylistItem
.
Metadata
(
"
a3
"
,
"
b3
"
,
"
c3
"
))
e3
=
PlaylistItem
(
"
file3.flac
"
,
5
,
100
,
PlaylistItem
.
Metadata
(
"
a3
"
,
"
b3
"
,
"
c3
"
))
...
@@ -127,7 +127,7 @@ class TestDomain(unittest.TestCase):
...
@@ -127,7 +127,7 @@ class TestDomain(unittest.TestCase):
def
test_playlist_duration
(
self
):
def
test_playlist_duration
(
self
):
print
(
self
.
_testMethodName
)
print
(
self
.
_testMethodName
)
pl
=
Playlist
()
pl
=
Playlist
(
1
)
e1
=
PlaylistItem
(
"
file1.flac
"
,
2
,
100
,
PlaylistItem
.
Metadata
(
"
a1
"
,
"
b1
"
,
"
c1
"
))
e1
=
PlaylistItem
(
"
file1.flac
"
,
2
,
100
,
PlaylistItem
.
Metadata
(
"
a1
"
,
"
b1
"
,
"
c1
"
))
e2
=
PlaylistItem
(
"
file2.flac
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
))
e2
=
PlaylistItem
(
"
file2.flac
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
))
e3
=
PlaylistItem
(
"
file3.flac
"
,
5
,
100
,
PlaylistItem
.
Metadata
(
"
a3
"
,
"
b3
"
,
"
c3
"
))
e3
=
PlaylistItem
(
"
file3.flac
"
,
5
,
100
,
PlaylistItem
.
Metadata
(
"
a3
"
,
"
b3
"
,
"
c3
"
))
...
@@ -142,7 +142,7 @@ class TestDomain(unittest.TestCase):
...
@@ -142,7 +142,7 @@ class TestDomain(unittest.TestCase):
ts
=
Timeslot
(
id
=
333
,
repetition_id
=
888
,
start
=
100
,
end
=
120
,
show
=
None
,
episode
=
None
)
ts
=
Timeslot
(
id
=
333
,
repetition_id
=
888
,
start
=
100
,
end
=
120
,
show
=
None
,
episode
=
None
)
pl
=
Playlist
()
pl
=
Playlist
(
1
)
e1
=
PlaylistItem
(
"
file1.flac
"
,
2
,
100
,
PlaylistItem
.
Metadata
(
"
a1
"
,
"
b1
"
,
"
c1
"
))
e1
=
PlaylistItem
(
"
file1.flac
"
,
2
,
100
,
PlaylistItem
.
Metadata
(
"
a1
"
,
"
b1
"
,
"
c1
"
))
e2
=
PlaylistItem
(
"
file2.flac
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
))
e2
=
PlaylistItem
(
"
file2.flac
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
))
e3
=
PlaylistItem
(
"
file3.flac
"
,
5
,
100
,
PlaylistItem
.
Metadata
(
"
a3
"
,
"
b3
"
,
"
c3
"
))
e3
=
PlaylistItem
(
"
file3.flac
"
,
5
,
100
,
PlaylistItem
.
Metadata
(
"
a3
"
,
"
b3
"
,
"
c3
"
))
...
@@ -169,7 +169,7 @@ class TestDomain(unittest.TestCase):
...
@@ -169,7 +169,7 @@ class TestDomain(unittest.TestCase):
ts
=
Timeslot
(
id
=
333
,
repetition_id
=
888
,
start
=
100
,
end
=
200
,
show
=
None
,
episode
=
None
)
ts
=
Timeslot
(
id
=
333
,
repetition_id
=
888
,
start
=
100
,
end
=
200
,
show
=
None
,
episode
=
None
)
pl
=
Playlist
()
pl
=
Playlist
(
1
)
e1
=
PlaylistItem
(
"
file1.flac
"
,
2
,
100
,
PlaylistItem
.
Metadata
(
"
a1
"
,
"
b1
"
,
"
c1
"
))
e1
=
PlaylistItem
(
"
file1.flac
"
,
2
,
100
,
PlaylistItem
.
Metadata
(
"
a1
"
,
"
b1
"
,
"
c1
"
))
e2
=
PlaylistItem
(
"
file2.flac
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
))
e2
=
PlaylistItem
(
"
file2.flac
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
))
e3
=
PlaylistItem
(
"
file3.flac
"
,
5
,
100
,
PlaylistItem
.
Metadata
(
"
a3
"
,
"
b3
"
,
"
c3
"
))
e3
=
PlaylistItem
(
"
file3.flac
"
,
5
,
100
,
PlaylistItem
.
Metadata
(
"
a3
"
,
"
b3
"
,
"
c3
"
))
...
@@ -210,7 +210,7 @@ class TestDomain(unittest.TestCase):
...
@@ -210,7 +210,7 @@ class TestDomain(unittest.TestCase):
print
(
self
.
_testMethodName
)
print
(
self
.
_testMethodName
)
ts
=
Timeslot
(
id
=
333
,
repetition_id
=
888
,
start
=
100
,
end
=
200
,
show
=
None
,
episode
=
None
)
ts
=
Timeslot
(
id
=
333
,
repetition_id
=
888
,
start
=
100
,
end
=
200
,
show
=
None
,
episode
=
None
)
pl
=
Playlist
()
pl
=
Playlist
(
1
)
item
=
PlaylistItem
(
item
=
PlaylistItem
(
"
https://stream.your.radio
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
)
"
https://stream.your.radio
"
,
3
,
100
,
PlaylistItem
.
Metadata
(
"
a2
"
,
"
b2
"
,
"
c2
"
)
)
)
...
...
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