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

svn at svn.open-ils.org svn at svn.open-ils.org
Mon May 9 13:10:23 EDT 2011


Author: dbs
Date: 2011-05-09 13:10:19 -0400 (Mon, 09 May 2011)
New Revision: 2246

Modified:
   trunk/src/python/tests/net_obj_test.py
Log:
Inline TestObject for net_obj_test.py as well

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


Modified: trunk/src/python/tests/net_obj_test.py
===================================================================
--- trunk/src/python/tests/net_obj_test.py	2011-05-09 13:53:30 UTC (rev 2245)
+++ trunk/src/python/tests/net_obj_test.py	2011-05-09 17:10:19 UTC (rev 2246)
@@ -7,6 +7,17 @@
 
 import osrf.json, osrf.net_obj, unittest
 
+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 CheckNetworkEncoder(unittest.TestCase):
     """Tests the NetworkEncoder JSON encoding extension"""
 



More information about the opensrf-commits mailing list