Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim McNamara <paperless@timmcnamara.co.nz>2010-08-14 11:00:28 (GMT)
committer Tim McNamara <paperless@timmcnamara.co.nz>2010-08-14 11:00:28 (GMT)
commitb5fdfa41bf87d167fa18ae93602efdd28c20296f (patch)
tree468803cb8ae5c124a591c047b84d048fb6cdee6c
parent94ceb14c724a565ed53d2ca9450d2c4a549bfc7f (diff)
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.
-rwxr-xr-xExperior.Activity/tests/test_rpcserver.py18
1 files changed, 13 insertions, 5 deletions
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 <http://www.gnu.org/licenses/>.
"""
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()