CC-5990, CC-5991 - Python cleanup, removed need for /usr/lib/airtime
This commit is contained in:
parent
cd102b984b
commit
875a9dfd8b
115 changed files with 248 additions and 212 deletions
26
python_apps/pypo/tests/test_modify_cue_in.py
Normal file
26
python_apps/pypo/tests/test_modify_cue_in.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
from pypopush import PypoPush
|
||||
from threading import Lock
|
||||
from Queue import Queue
|
||||
|
||||
import datetime
|
||||
|
||||
pypoPush_q = Queue()
|
||||
telnet_lock = Lock()
|
||||
|
||||
pp = PypoPush(pypoPush_q, telnet_lock)
|
||||
|
||||
def test_modify_cue_in():
|
||||
link = pp.modify_first_link_cue_point([])
|
||||
assert len(link) == 0
|
||||
|
||||
min_ago = datetime.datetime.utcnow() - datetime.timedelta(minutes = 1)
|
||||
link = [{"start":min_ago.strftime("%Y-%m-%d-%H-%M-%S"),
|
||||
"cue_in":"0", "cue_out":"30"}]
|
||||
link = pp.modify_first_link_cue_point(link)
|
||||
assert len(link) == 0
|
||||
|
||||
link = [{"start":min_ago.strftime("%Y-%m-%d-%H-%M-%S"),
|
||||
"cue_in":"0", "cue_out":"70"}]
|
||||
link = pp.modify_first_link_cue_point(link)
|
||||
assert len(link) == 1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue