oddluck 547e7ff9cb Add 'Tweety/' from commit '9b7d3f9b4f4d54f2569f4ea9f375d92d154dcb2c'
git-subtree-dir: Tweety
git-subtree-mainline: 63c4552f426bd660b2844bee4791f6674f27b1ed
git-subtree-split: 9b7d3f9b4f4d54f2569f4ea9f375d92d154dcb2c
2019-03-05 23:21:31 -05:00

30 lines
1.1 KiB
Python

# Copyright (c) 2013-2014, spline
###
from supybot.test import *
import os
class TweetyTestCase(PluginTestCase):
plugins = ('Tweety',)
def setUp(self):
PluginTestCase.setUp(self)
# get our variables via the secure environment.
consumerKey = os.environ.get('consumerKey')
consumerSecret = os.environ.get('consumerSecret')
accessKey = os.environ.get('accessKey')
accessSecret = os.environ.get('accessSecret')
# now set them.
conf.supybot.plugins.Tweety.consumerKey.setValue(consumerKey)
conf.supybot.plugins.Tweety.consumerSecret.setValue(consumerSecret)
conf.supybot.plugins.Tweety.accessKey.setValue(accessKey)
conf.supybot.plugins.Tweety.accessSecret.setValue(accessSecret)
def testTweety(self):
self.assertSnarfResponse('reload Tweety', 'The operation succeeded.')
self.assertRegexp('trends', 'Top 10 Twitter Trends')
self.assertRegexp('twitter --info CNN', 'CNN')
self.assertRegexp('twitter CNN', 'CNN')
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: