From 78441d5fbf0cbcc9dec6d959adfb70c7da866d97 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Thu, 28 Jun 2012 19:03:10 -0700 Subject: [PATCH] kill .py --- modules/calc.py | 9 --------- modules/test/test_calc.py | 12 +----------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/modules/calc.py b/modules/calc.py index 4725e80..ea29b4c 100644 --- a/modules/calc.py +++ b/modules/calc.py @@ -52,15 +52,6 @@ def c(phenny, input): c.commands = ['c'] c.example = '.c 5 + 3' -def py(phenny, input): - query = input.group(2) or "" - uri = 'http://tumbolia.appspot.com/py/' - answer = web.get(uri + web.quote(query)) - if answer: - phenny.say(answer) - else: phenny.reply('Sorry, no result.') -py.commands = ['py'] - def wa(phenny, input): if not input.group(2): return phenny.reply("No search term.") diff --git a/modules/test/test_calc.py b/modules/test/test_calc.py index 34be034..875f300 100644 --- a/modules/test/test_calc.py +++ b/modules/test/test_calc.py @@ -5,7 +5,7 @@ author: mutantmonkey import unittest from mock import MagicMock, Mock -from modules.calc import c, py, wa +from modules.calc import c, wa class TestCalc(unittest.TestCase): @@ -30,16 +30,6 @@ class TestCalc(unittest.TestCase): self.phenny.reply.assert_called_once_with('Sorry, no result.') - def test_py(self): - input = Mock(group=lambda x: "'test'*3") - py(self.phenny, input) - - self.phenny.say.assert_called_once_with('testtesttest\n') - - def test_py_none(self): - input = Mock(group=lambda x: "") - py(self.phenny, input) - def test_wa(self): input = Mock(group=lambda x: 'airspeed of an unladen swallow') wa(self.phenny, input)