2012-06-01 02:56:54 -04:00
|
|
|
"""
|
|
|
|
test_mylife.py - tests for the mylife module
|
|
|
|
author: mutantmonkey <mutantmonkey@mutantmonkey.in>
|
|
|
|
"""
|
|
|
|
|
|
|
|
import unittest
|
2012-06-02 04:13:50 -04:00
|
|
|
from mock import MagicMock
|
2012-06-01 02:56:54 -04:00
|
|
|
from modules import mylife
|
|
|
|
|
2012-06-01 03:13:57 -04:00
|
|
|
|
2012-06-01 02:56:54 -04:00
|
|
|
class TestMylife(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
|
|
self.phenny = MagicMock()
|
|
|
|
|
|
|
|
def test_fml(self):
|
|
|
|
mylife.fml(self.phenny, None)
|
2012-06-02 06:07:22 -04:00
|
|
|
assert self.phenny.say.called is True
|
2012-06-01 02:56:54 -04:00
|
|
|
|
|
|
|
def test_mlia(self):
|
|
|
|
mylife.mlia(self.phenny, None)
|
2012-06-02 06:07:22 -04:00
|
|
|
assert self.phenny.say.called is True
|
2012-06-01 02:56:54 -04:00
|
|
|
|
|
|
|
def test_mlib(self):
|
|
|
|
mylife.mlib(self.phenny, None)
|
2012-06-02 06:07:22 -04:00
|
|
|
assert self.phenny.say.called is True
|
2012-06-01 02:56:54 -04:00
|
|
|
|
2013-08-25 17:32:42 -04:00
|
|
|
def test_mlig(self):
|
|
|
|
mylife.mlib(self.phenny, None)
|
|
|
|
assert self.phenny.say.called is True
|
|
|
|
|
2012-06-01 02:56:54 -04:00
|
|
|
def test_mlih(self):
|
|
|
|
mylife.mlih(self.phenny, None)
|
2012-06-02 06:07:22 -04:00
|
|
|
assert self.phenny.say.called is True
|
2012-06-01 02:56:54 -04:00
|
|
|
|
|
|
|
def test_mlihp(self):
|
|
|
|
mylife.mlihp(self.phenny, None)
|
2012-06-02 06:07:22 -04:00
|
|
|
assert self.phenny.say.called is True
|