mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Tyop.
This commit is contained in:
parent
b78cabaed5
commit
14043d28e2
@ -119,23 +119,23 @@ class PluginTestCase(unittest.TestCase):
|
|||||||
# fixed, but not until then.
|
# fixed, but not until then.
|
||||||
def assertError(self, query):
|
def assertError(self, query):
|
||||||
m = self._feedMsg(query)
|
m = self._feedMsg(query)
|
||||||
self.failUnless(m, msg)
|
self.failUnless(m)
|
||||||
self.failUnless(m.args[1].startswith('Error:'), '%r errored' % query)
|
self.failUnless(m.args[1].startswith('Error:'), '%r errored' % query)
|
||||||
|
|
||||||
def assertNotError(self, query):
|
def assertNotError(self, query):
|
||||||
m = self._feedMsg(query)
|
m = self._feedMsg(query)
|
||||||
self.failUnless(m, msg)
|
self.failUnless(m)
|
||||||
self.failIf(m.args[1].startswith('Error:'), '%r errored' % query)
|
self.failIf(m.args[1].startswith('Error:'), '%r errored' % query)
|
||||||
|
|
||||||
def assertResponse(self, query, expectedResponse):
|
def assertResponse(self, query, expectedResponse):
|
||||||
m = self._feedMsg(query)
|
m = self._feedMsg(query)
|
||||||
self.failUnless(m, msg)
|
self.failUnless(m)
|
||||||
self.assertEqual(m.args[1], expectedResponse,
|
self.assertEqual(m.args[1], expectedResponse,
|
||||||
'%r != %r' % (expectedResponse, m.args[1]))
|
'%r != %r' % (expectedResponse, m.args[1]))
|
||||||
|
|
||||||
def assertRegexp(self, query, regexp):
|
def assertRegexp(self, query, regexp):
|
||||||
m = self._feedMsg(query)
|
m = self._feedMsg(query)
|
||||||
self.failUnless(m, msg)
|
self.failUnless(m)
|
||||||
self.failUnless(re.search(regexp, m.args[1]),
|
self.failUnless(re.search(regexp, m.args[1]),
|
||||||
'%r does not match %r' % (m.args[1], regexp))
|
'%r does not match %r' % (m.args[1], regexp))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user