mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-26 13:01:09 -05:00
git-subtree-dir: Tweety git-subtree-mainline: 63c4552f426bd660b2844bee4791f6674f27b1ed git-subtree-split: 9b7d3f9b4f4d54f2569f4ea9f375d92d154dcb2c
30 lines
1.1 KiB
Python
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:
|