add wuvt test
parent
546b3113d5
commit
6aef5cab6f
|
@ -0,0 +1,25 @@
|
||||||
|
"""
|
||||||
|
test_wuvt.py - tests for the wuvt module
|
||||||
|
author: mutantmonkey <mutantmonkey@mutantmonkey.in>
|
||||||
|
"""
|
||||||
|
|
||||||
|
# add current working directory to path
|
||||||
|
import sys
|
||||||
|
sys.path.append('.')
|
||||||
|
|
||||||
|
import re
|
||||||
|
import unittest
|
||||||
|
from mock import MagicMock, Mock
|
||||||
|
from modules.wuvt import wuvt
|
||||||
|
|
||||||
|
class TestWuvt(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.phenny = MagicMock()
|
||||||
|
|
||||||
|
def test_wuvt(self):
|
||||||
|
wuvt(self.phenny, None)
|
||||||
|
|
||||||
|
out = self.phenny.reply.call_args[0][0]
|
||||||
|
m = re.match('^DJ .* is currently playing: .* by .*$', out,
|
||||||
|
flags=re.UNICODE)
|
||||||
|
self.assertTrue(m)
|
Loading…
Reference in New Issue