summaryrefslogtreecommitdiff
path: root/900-implements.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-04-13 21:48:32 +0300
committerLars Wirzenius <liw@liw.fi>2017-04-13 21:48:32 +0300
commit565451036364509ba00d7acfee065b4b6f896b3e (patch)
treea6548d44c7411d8078c92de9d49c01a027c115b1 /900-implements.yarn
parentd8e93703719978e521c99b34cc92a2fd6209e13a (diff)
downloadserver-yarns-565451036364509ba00d7acfee065b4b6f896b3e.tar.gz
Use asserts from yarnutils
Also, drop code from yarnhelper that is no longer needed.
Diffstat (limited to '900-implements.yarn')
-rw-r--r--900-implements.yarn14
1 files changed, 7 insertions, 7 deletions
diff --git a/900-implements.yarn b/900-implements.yarn
index 4e64995..72427a5 100644
--- a/900-implements.yarn
+++ b/900-implements.yarn
@@ -19,7 +19,7 @@
h = yarnhelper.YarnHelper()
expected = vars['http_status']
actual = int(get_next_match())
- h.assertEqual(expected, actual)
+ assertEqual(expected, actual)
IMPLEMENTS THEN HTTP body matches "(.*)"
h = yarnhelper.YarnHelper()
@@ -27,7 +27,7 @@
sys.stdout.write('Body:\n{}'.format(repr(body)))
pattern = get_next_match()
m = re.search(pattern, body)
- h.assertNotEqual(m, None)
+ assertNotEqual(m, None)
## Running commands and checking results
@@ -57,7 +57,7 @@
IMPLEMENTS THEN exit code is (\d+)
h = yarnhelper.YarnHelper()
code = get_next_match()
- h.assertEqual(vars['exit'], int(code))
+ assertEqual(vars['exit'], int(code))
IMPLEMENTS THEN standard output matches "(.+)"
h = yarnhelper.YarnHelper()
@@ -67,7 +67,7 @@
print 'pattern:', repr(pattern)
print 'argv:', repr(vars['argv'])
print 'stdout:', repr(stdout)
- h.assertNotEqual(m, None)
+ assertNotEqual(m, None)
IMPLEMENTS THEN standard error matches "(.+)"
h = yarnhelper.YarnHelper()
@@ -77,7 +77,7 @@
print 'pattern:', repr(pattern)
print 'argv:', repr(vars['argv'])
print 'stderr:', repr(stderr)
- h.assertNotEqual(m, None)
+ assertNotEqual(m, None)
# Mail handling tests
@@ -129,7 +129,7 @@
print 'Subject:', msg['Subject']
got_it = got_it or (msg['Subject'] == subject)
h.iterate_mails_in_imap_mailbox(address, user, password, match, False)
- h.assertEqual(got_it, True)
+ assertTrue(got_it)
## Delete mails
@@ -189,4 +189,4 @@
print 'Command:', cmd
actual_status, msg = server.docmd(cmd)
server.quit()
- h.assertEqual(actual_status, wanted_status)
+ assertEqual(actual_status, wanted_status)