[Opensrf-commits] r2245 - trunk/src/python/tests (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon May 9 09:53:32 EDT 2011


Author: dbs
Date: 2011-05-09 09:53:30 -0400 (Mon, 09 May 2011)
New Revision: 2245

Removed:
   trunk/src/python/tests/testobj.py
Modified:
   trunk/src/python/tests/json_test.py
   trunk/src/python/tests/net_obj_test.py
Log:
Fix unit tests for Python in a twistd instance

twistd could not find testobj; just inline it.

Signed-off-by: Dan Scott <dan at coffeecode.net>


Modified: trunk/src/python/tests/json_test.py
===================================================================
--- trunk/src/python/tests/json_test.py	2011-05-09 05:19:51 UTC (rev 2244)
+++ trunk/src/python/tests/json_test.py	2011-05-09 13:53:30 UTC (rev 2245)
@@ -1,3 +1,7 @@
+"""
+Unit tests for the osrf.json module
+"""
+
 import sys, os
 sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
 
@@ -2,4 +6,14 @@
 import osrf.json, osrf.net_obj, unittest
-from testobj import TestObject
 
+class TestObject(object):
+    """Test object with basic JSON structures"""
+    def __init__(self):
+        self.int = 1
+        self.string = "two"
+        self.array = [1,2,3,4]
+        self.dict = {'foo': 'bar', 'key': 'value'}
+        self.true = True
+        self.false = False
+        self.null = None
+
 class CheckObjectToJSON(unittest.TestCase):

Modified: trunk/src/python/tests/net_obj_test.py
===================================================================
--- trunk/src/python/tests/net_obj_test.py	2011-05-09 05:19:51 UTC (rev 2244)
+++ trunk/src/python/tests/net_obj_test.py	2011-05-09 13:53:30 UTC (rev 2245)
@@ -1,3 +1,7 @@
+"""
+Unit tests for the osrf.net_obj module
+"""
+
 import sys, os
 sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
 
@@ -2,3 +6,2 @@
 import osrf.json, osrf.net_obj, unittest
-from testobj import TestObject
 

Deleted: trunk/src/python/tests/testobj.py
===================================================================
--- trunk/src/python/tests/testobj.py	2011-05-09 05:19:51 UTC (rev 2244)
+++ trunk/src/python/tests/testobj.py	2011-05-09 13:53:30 UTC (rev 2245)
@@ -1,11 +0,0 @@
-class TestObject(object):
-    def __init__(self):
-        self.int = 1
-        self.string = "two"
-        self.array = [1,2,3,4]
-        self.dict = {'foo': 'bar', 'key': 'value'}
-        self.true = True
-        self.false = False
-        self.null = None
-
-



More information about the opensrf-commits mailing list