Mercurial > hg > AuthRPC
changeset 11:dbd55e6af4f6
Added test
author | Ben Croston <ben@croston.org> |
---|---|
date | Mon, 05 Sep 2011 12:13:45 +0100 |
parents | 58e764e39492 |
children | 4ac14cfadc15 |
files | wibble/tests.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/wibble/tests.py Sun Sep 04 23:46:21 2011 +0100 +++ b/wibble/tests.py Mon Sep 05 12:13:45 2011 +0100 @@ -38,6 +38,9 @@ def raiseexception(self): dividebyzeroerror = 1/0 + def returnnothing(self): + pass + def myauth(username, password, useragent=None): return username == 'testuser' and \ hashlib.md5('s3cr3t').hexdigest() == password and \ @@ -94,6 +97,10 @@ POUND = unicode('\u00A3') self.assertEqual(self.client.echo(POUND), 'ECHO: ' + POUND) self.assertEqual(self.client.echo('hello mum!'), 'ECHO: hello mum!') + +class ReturnNothing(WibbleTests): + def runTest(self): + self.assertEqual(self.client.returnnothing(), None) ##### client ^^^ ##### finished = False @@ -115,6 +122,7 @@ suite.addTest(ExceptionTest()) suite.addTest(BadRequestTest()) suite.addTest(EchoTest()) + suite.addTest(ReturnNothing()) return suite if __name__ == '__main__':