Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4793427
test_clear_video_queue.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
581 B
Referenced Files
None
Subscribers
None
test_clear_video_queue.py
View Options
#!/usr/bin/env python3
from
importlib.machinery
import
SourceFileLoader
import
unittest
path
=
"roles/paas-docker/containers/files/mastodon/clear-video-queue.py"
script
=
SourceFileLoader
(
"script"
,
"../"
+
path
)
.
load_module
()
class
Testinstance
(
unittest
.
TestCase
):
def
test_extract_pids
(
self
):
with
open
(
"data/T1492-ps-x-sample.txt"
,
"r"
)
as
fd
:
ps_data
=
[
line
.
strip
()
for
line
in
fd
]
expected_pids
=
[
11562
,
11693
,
11895
]
self
.
assertEqual
(
expected_pids
,
script
.
extract_pids
(
ps_data
))
if
__name__
==
"__main__"
:
unittest
.
main
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Fri, Feb 28, 21:45 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2437096
Default Alt Text
test_clear_video_queue.py (581 B)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment