mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Fixed networkishness.
This commit is contained in:
parent
61cc643932
commit
9cba6478b1
@ -32,14 +32,24 @@
|
|||||||
from testsupport import *
|
from testsupport import *
|
||||||
|
|
||||||
url = 'http://www.advogato.org/rss/articles.xml'
|
url = 'http://www.advogato.org/rss/articles.xml'
|
||||||
if network:
|
class RSSTestCase(PluginTestCase, PluginDocumentation):
|
||||||
class RSSTestCase(PluginTestCase, PluginDocumentation):
|
plugins = ('RSS',)
|
||||||
plugins = ('RSS',)
|
def testRssAddBadName(self):
|
||||||
|
self.assertError('rss add "foo bar" %s' % url)
|
||||||
|
|
||||||
|
def testCantAddFeedNamedRss(self):
|
||||||
|
self.assertError('rss add rss %s' % url)
|
||||||
|
|
||||||
|
def testCantRemoveMethodThatIsntFeed(self):
|
||||||
|
self.assertError('rss remove rss')
|
||||||
|
|
||||||
|
if network:
|
||||||
def testRssinfo(self):
|
def testRssinfo(self):
|
||||||
self.assertNotError('rss info %s' % url)
|
self.assertNotError('rss info %s' % url)
|
||||||
self.assertNotError('rss add advogato %s' % url)
|
self.assertNotError('rss add advogato %s' % url)
|
||||||
self.assertNotError('rss info advogato')
|
self.assertNotError('rss info advogato')
|
||||||
self.assertNotError('rss info AdVogATo')
|
self.assertNotError('rss info AdVogATo')
|
||||||
|
self.assertNotError('rss remove advogato')
|
||||||
|
|
||||||
def testRssinfoDoesTimeProperly(self):
|
def testRssinfoDoesTimeProperly(self):
|
||||||
self.assertNotRegexp('rss info http://slashdot.org/slashdot.rss',
|
self.assertNotRegexp('rss info http://slashdot.org/slashdot.rss',
|
||||||
@ -51,26 +61,12 @@ if network:
|
|||||||
self.failUnless(m.args[1].count('||') == 1)
|
self.failUnless(m.args[1].count('||') == 1)
|
||||||
|
|
||||||
def testRssAdd(self):
|
def testRssAdd(self):
|
||||||
try:
|
self.assertNotError('rss add advogato %s' % url)
|
||||||
orig = conf.supybot.reply.whenNotCommand()
|
self.assertNotError('advogato')
|
||||||
conf.supybot.reply.whenNotCommand.setValue(True)
|
self.assertNotError('rss advogato')
|
||||||
self.assertNotError('rss add advogato %s' % url)
|
self.assertNotError('rss remove advogato')
|
||||||
self.assertNotError('advogato')
|
self.assertError('advogato')
|
||||||
self.assertNotError('rss advogato')
|
self.assertError('rss advogato')
|
||||||
self.assertNotError('rss remove advogato')
|
|
||||||
self.assertError('advogato')
|
|
||||||
self.assertError('rss advogato')
|
|
||||||
finally:
|
|
||||||
conf.supybot.reply.whenNotCommand.setValue(orig)
|
|
||||||
|
|
||||||
def testRssAddBadName(self):
|
|
||||||
self.assertError('rss add "foo bar" %s' % url)
|
|
||||||
|
|
||||||
def testCantAddFeedNamedRss(self):
|
|
||||||
self.assertError('rss add rss %s' % url)
|
|
||||||
|
|
||||||
def testCantRemoveMethodThatIsntFeed(self):
|
|
||||||
self.assertError('rss remove rss')
|
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
Reference in New Issue
Block a user