Fix tests
This commit is contained in:
parent
6213604341
commit
e8a0783139
8 changed files with 20 additions and 79 deletions
|
@ -125,7 +125,7 @@ class PypoLiquidsoap():
|
|||
scheduled_now_webstream = \
|
||||
[x for x in scheduled_now if x["type"] == eventtypes.STREAM_OUTPUT_START]
|
||||
|
||||
schedule_ids = {x["row_id"] for x in scheduled_now_files]}
|
||||
schedule_ids = [x["row_id"] for x in scheduled_now_files]
|
||||
|
||||
row_id_map = {}
|
||||
liq_queue_ids = set()
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
which py.test
|
||||
pytest_exist=$?
|
||||
|
||||
if [ "$pytest_exist" != "0" ]; then
|
||||
echo "Need to have py.test installed. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCRIPT=`readlink -f $0`
|
||||
# Absolute directory this script is in
|
||||
SCRIPTPATH=`dirname $SCRIPT`
|
||||
|
||||
export PYTHONPATH=$PYTHONPATH:$SCRIPTPATH/..:$SCRIPTPATH/../..
|
||||
|
||||
py.test
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
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