Commit 20d7bf2f authored by Julien Cristau's avatar Julien Cristau
Browse files

[test] use assert{Not,}In as appropriate

parent d4eec2821820
......@@ -21,18 +21,18 @@ class ForgotTC(CubicWebTC):
self.assertEqual(len(MAILBOX), 0)
self.session.repo.forgotpwd_send_email({'use_email':'test_user1@logilab.fr'})
self.assertEqual(len(MAILBOX), 1)
self.assert_('None' not in MAILBOX[0].content)
self.assertNotIn('None', MAILBOX[0].content)
def test_reset_https(self):
MAILBOX[:] = []
self.config.global_set_option('base-url', 'http://babar.com/')
self.session.repo.forgotpwd_send_email({'use_email':'test_user2@logilab.fr'})
self.assert_('http://babar.com/' in MAILBOX[0].content)
self.assertIn('http://babar.com/', MAILBOX[0].content)
self.config.global_set_option('https-url', 'https://babar.com/')
self.session.repo.forgotpwd_send_email({'use_email':'test_user3@logilab.fr'})
print MAILBOX[1].content
self.assert_('https://babar.com/' in MAILBOX[1].content)
self.assertIn('https://babar.com/', MAILBOX[1].content)
if __name__ == '__main__':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment