Download:
child 37:b4e3fa814a17
parent 35:ec831f0ca300
36:9a474aabfe41 draft
Anton Shestakov <av6@dwimlabs.net>, Fri, 30 Nov 2018 20:49:45 +0800
test: switch to ChannelPluginTestCase, test snarfing

1 файлов изменено, 11 вставок(+), 7 удалений(-) [+]
test.py file | annotate | diff | comparison | revisions
--- a/test.py Thu Nov 22 17:47:30 2018 +0800
+++ b/test.py Fri Nov 30 20:49:45 2018 +0800
@@ -30,7 +30,7 @@
from supybot.test import *
-class MercurialTestCase(PluginTestCase):
+class MercurialTestCase(ChannelPluginTestCase):
plugins = ('Mercurial',)
config = {'supybot.plugins.Mercurial.repos.hg': '.'}
@@ -51,12 +51,16 @@
self.assertHelp('main')
def testDifferential(self):
- self.assertResponse('differential 3850',
- 'Revision https://phab.mercurial-scm.org/D3850'
- ' Closed, stringutil: update list of re-special characters to include &~')
- self.assertResponse('differential D5194',
- 'Revision https://phab.mercurial-scm.org/D5194'
- ' Abandoned, wireprotov2: add an extension to cache wireproto v2 responses in S3')
+ expected = (
+ 'Revision https://phab.mercurial-scm.org/D3850'
+ ' Closed, stringutil: update list of re-special characters to include &~'
+ )
+ self.assertResponse('differential 3850', expected)
+ expected = (
+ 'Revision https://phab.mercurial-scm.org/D5194'
+ ' Abandoned, wireprotov2: add an extension to cache wireproto v2 responses in S3'
+ )
+ self.assertSnarfResponse('snarf me D5194!', expected)
self.assertHelp('differential')
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: