diff options
author | akuchling <devnull@localhost> | 2005-03-19 16:40:23 +0000 |
---|---|---|
committer | akuchling <devnull@localhost> | 2005-03-19 16:40:23 +0000 |
commit | bdb7b6ff6d08067755a79e01eca6435a914a1289 (patch) | |
tree | f00b916f4da821c909762f3306e802d41f60aeab /tests | |
parent | 006cc761668bc566da1fae0e0c5f0c5ca80cf611 (diff) | |
download | decorator-bdb7b6ff6d08067755a79e01eca6435a914a1289.tar.gz |
Add test case
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/rpc-test.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/rpc-test.py b/tests/rpc-test.py new file mode 100755 index 0000000..aea6112 --- /dev/null +++ b/tests/rpc-test.py @@ -0,0 +1,27 @@ +import sys +import config +import store +import unittest +import rpc +import cStringIO + +class XMLRPC ( unittest.TestCase ): + + def setUp( self ): + # get a storage object to use in calls to xmlrpc functions + self.store = store.Store( config.Config( "/tmp/pypi/config.ini", "webui" ) ) + + def testEcho( self ): + result = rpc.echo(self.store, 'a', 'b', 1, 3.4) + self.failUnlessEqual(result, ('a', 'b', 1, 3.4)) + + def testIndex( self ): + result = rpc.index( self.store ) + self.failUnless( len( result ) > 0 ) + + def testSearch( self ): + result = rpc.search( self.store, "sql" ) + self.failUnless( len( result ) > 0 ) + +if __name__ == '__main__': + unittest.main() |