From b5fdfa41bf87d167fa18ae93602efdd28c20296f Mon Sep 17 00:00:00 2001 From: Tim McNamara Date: Sat, 14 Aug 2010 11:00:28 +0000 Subject: Turned into unittest.TestCase The test does not yet work properly. Need to grok how things work. However, the tests in this module should be slightly more consistent with unittest.TestCase. --- diff --git a/Experior.Activity/tests/test_rpcserver.py b/Experior.Activity/tests/test_rpcserver.py index 919e82c..6c18ba1 100755 --- a/Experior.Activity/tests/test_rpcserver.py +++ b/Experior.Activity/tests/test_rpcserver.py @@ -19,16 +19,22 @@ You should have received a copy of the GNU General Public License along with sugarbot. If not, see . """ import os +import unittest +from sys import path +from random import randint + +from xmlrpclib import ServerProxy + +path.append("..") + try: import sbconfig except ImportError: import sbconfig_sample - -from random import randint from sbrpcserver import * -from xmlrpclib import ServerProxy -class test_rpcServer: + +class TestRPCServer(unittest.TestCase): files = ["fileOne.py", "fileTwo.py"] activityNames = ["activityOne", "activityTwo"] @@ -140,4 +146,6 @@ def sugarbot_main(var): for script in self.scripts: self.server.startScript() assert self.server.getScript() == script - \ No newline at end of file + +if __name__ == "__main__": + unittest.main() -- cgit v0.9.1