improve tests and test coverage

This commit is contained in:
mutantmonkey
2013-08-25 14:32:42 -07:00
parent f5fb2fc37d
commit 23d99dd326
6 changed files with 55 additions and 20 deletions

View File

@@ -15,5 +15,10 @@ class TestShort(unittest.TestCase):
def test_short(self):
input = Mock(group=lambda x: 'http://vtluug.org/')
short(self.phenny, input)
self.phenny.reply.assert_called_once_with('http://vtlu.ug/bLQYAy')
def test_short_none(self):
input = Mock(group=lambda x: None)
short(self.phenny, input)
self.phenny.reply.assert_called_once_with(
"No URL provided. CAN I HAS?")