Skip to content

Commit

Permalink
Python 3.4+ is now required
Browse files Browse the repository at this point in the history
  • Loading branch information
mutantmonkey committed Apr 10, 2017
1 parent 20cc193 commit 999297b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ will need to be updated to run on Python3 if they do not already. All of the
core modules have been ported, removed, or replaced.

## Requirements
* Python 3.2+
* Python 3.4+
* [python-requests](http://docs.python-requests.org/en/latest/)

## Installation
Expand Down
11 changes: 0 additions & 11 deletions modules/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,5 @@ def search(phenny, input):
phenny.reply(result)
search.commands = ['search']

def suggest(phenny, input):
if not input.group(2):
return phenny.reply("No query term.")
query = input.group(2)
uri = 'http://websitedev.de/temp-bin/suggest.pl?q='
answer = web.get(uri + web.quote(query).replace('+', '%2B'))
if answer:
phenny.say(answer)
else: phenny.reply('Sorry, no result.')
suggest.commands = ['suggest']

if __name__ == '__main__':
print(__doc__.strip())
9 changes: 1 addition & 8 deletions modules/test/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from mock import MagicMock, Mock
from modules.search import duck_api, google_search, google_count, \
formatnumber, g, gc, gcs, bing_search, bing, duck_search, duck, \
search, suggest
search


class TestSearch(unittest.TestCase):
Expand Down Expand Up @@ -75,10 +75,3 @@ def test_search(self):
duck(self.phenny, input)

assert self.phenny.reply.called is True

def test_suggest(self):
input = Mock(group=lambda x: 'vtluug')
suggest(self.phenny, input)

assert (self.phenny.reply.called is True or \
self.phenny.say.called is True)

0 comments on commit 999297b

Please sign in to comment.