phenny-1/modules/test/test_wuvt.py

22 lines
506 B
Python
Raw Normal View History

2012-05-31 03:55:31 -04:00
"""
test_wuvt.py - tests for the wuvt module
author: mutantmonkey <mutantmonkey@mutantmonkey.in>
"""
import re
import unittest
2012-06-02 04:13:50 -04:00
from mock import MagicMock
2012-05-31 03:55:31 -04:00
from modules.wuvt import wuvt
class TestWuvt(unittest.TestCase):
def setUp(self):
self.phenny = MagicMock()
def test_wuvt(self):
wuvt(self.phenny, None)
2015-03-05 19:14:46 -05:00
out = self.phenny.say.call_args[0][0]
2015-03-20 22:16:39 -04:00
m = re.match('^.* is currently playing .* by .*$', out,
2012-05-31 03:55:31 -04:00
flags=re.UNICODE)
self.assertTrue(m)