catfacts test and test cleanup
parent
f995769b6f
commit
6fece14639
|
@ -0,0 +1,22 @@
|
|||
"""
|
||||
test_catfacts.py - tests for the cat facts module
|
||||
author: mutantmonkey <mutantmonkey@mutantmonkey.in>
|
||||
"""
|
||||
|
||||
import re
|
||||
import unittest
|
||||
from mock import MagicMock
|
||||
from modules.catfacts import catfacts
|
||||
|
||||
|
||||
class TestCatfacts(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.phenny = MagicMock()
|
||||
|
||||
def test_catfacts(self):
|
||||
catfacts(self.phenny, None)
|
||||
|
||||
out = self.phenny.reply.call_args[0][0]
|
||||
m = re.match('^.* \(#[0-9]+\)$', out,
|
||||
flags=re.UNICODE)
|
||||
self.assertTrue(m)
|
|
@ -4,7 +4,7 @@ author: mutantmonkey <mutantmonkey@mutantmonkey.in>
|
|||
"""
|
||||
|
||||
import unittest
|
||||
from mock import MagicMock, Mock
|
||||
from mock import MagicMock
|
||||
from modules.commit import commit
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ author: mutantmonkey <mutantmonkey@mutantmonkey.in>
|
|||
"""
|
||||
|
||||
import unittest
|
||||
from mock import MagicMock, Mock
|
||||
from mock import MagicMock
|
||||
from modules import mylife
|
||||
|
||||
|
||||
|
|
|
@ -21,5 +21,3 @@ class TestNodeTodo(unittest.TestCase):
|
|||
m = re.match('^http://node-todobin\.herokuapp\.com/list/[a-z0-9]+$',
|
||||
out, flags=re.UNICODE)
|
||||
self.assertTrue(m)
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ sys.path.append('.')
|
|||
|
||||
import re
|
||||
import unittest
|
||||
from mock import MagicMock, Mock
|
||||
from mock import MagicMock
|
||||
from modules.wuvt import wuvt
|
||||
|
||||
class TestWuvt(unittest.TestCase):
|
||||
|
|
Loading…
Reference in New Issue