add what the commit test, simply mylife tests
parent
9add0985ec
commit
30705b87de
|
@ -0,0 +1,17 @@
|
||||||
|
"""
|
||||||
|
test_commit.py - tests for the what the commit module
|
||||||
|
author: mutantmonkey <mutantmonkey@mutantmonkey.in>
|
||||||
|
"""
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
from mock import MagicMock, Mock
|
||||||
|
from modules.commit import commit
|
||||||
|
|
||||||
|
|
||||||
|
class TestCommit(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.phenny = MagicMock()
|
||||||
|
|
||||||
|
def test_commit(self):
|
||||||
|
commit(self.phenny, None)
|
||||||
|
assert self.phenny.reply.called == 1
|
|
@ -14,42 +14,25 @@ class TestMylife(unittest.TestCase):
|
||||||
|
|
||||||
def test_fml(self):
|
def test_fml(self):
|
||||||
mylife.fml(self.phenny, None)
|
mylife.fml(self.phenny, None)
|
||||||
out = self.phenny.say.call_args[0][0]
|
assert self.phenny.say.called == 1
|
||||||
|
|
||||||
self.assertNotEqual(out,
|
|
||||||
"I tried to use .fml, but it was broken. FML")
|
|
||||||
|
|
||||||
def test_mlia(self):
|
def test_mlia(self):
|
||||||
mylife.mlia(self.phenny, None)
|
mylife.mlia(self.phenny, None)
|
||||||
out = self.phenny.say.call_args[0][0]
|
assert self.phenny.say.called == 1
|
||||||
|
|
||||||
self.assertNotEqual(out,
|
|
||||||
"I tried to use .mlia, but it wasn't loading. MLIA")
|
|
||||||
|
|
||||||
def test_mlib(self):
|
def test_mlib(self):
|
||||||
mylife.mlib(self.phenny, None)
|
mylife.mlib(self.phenny, None)
|
||||||
out = self.phenny.say.call_args[0][0]
|
assert self.phenny.say.called == 1
|
||||||
|
|
||||||
self.assertNotEqual(out,
|
|
||||||
"MLIB is out getting a case of Natty. It's chill.")
|
|
||||||
|
|
||||||
def test_mlih(self):
|
def test_mlih(self):
|
||||||
mylife.mlih(self.phenny, None)
|
mylife.mlih(self.phenny, None)
|
||||||
out = self.phenny.say.call_args[0][0]
|
assert self.phenny.say.called == 1
|
||||||
|
|
||||||
self.assertNotEqual(out,
|
|
||||||
"MLIH is giving some dome to some lax bros.")
|
|
||||||
|
|
||||||
def test_mlihp(self):
|
def test_mlihp(self):
|
||||||
mylife.mlihp(self.phenny, None)
|
mylife.mlihp(self.phenny, None)
|
||||||
out = self.phenny.say.call_args[0][0]
|
assert self.phenny.say.called == 1
|
||||||
|
|
||||||
self.assertNotEqual(out,
|
|
||||||
"This service is not available to Muggles.")
|
|
||||||
|
|
||||||
def test_mlit(self):
|
def test_mlit(self):
|
||||||
mylife.mlit(self.phenny, None)
|
mylife.mlit(self.phenny, None)
|
||||||
out = self.phenny.say.call_args[0][0]
|
assert self.phenny.say.called == 1
|
||||||
|
|
||||||
self.assertNotEqual(out,
|
|
||||||
"Error: Your life is too Twilight. Go outside.")
|
|
||||||
|
|
Loading…
Reference in New Issue