incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1445549 - /incubator/bloodhound/trunk/bloodhound_multiproduct/tests/model.py
Date Wed, 13 Feb 2013 10:55:40 GMT
Author: gjm
Date: Wed Feb 13 10:55:40 2013
New Revision: 1445549

URL: http://svn.apache.org/r1445549
Log:
test for table.field style updates - #378

Modified:
    incubator/bloodhound/trunk/bloodhound_multiproduct/tests/model.py

Modified: incubator/bloodhound/trunk/bloodhound_multiproduct/tests/model.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_multiproduct/tests/model.py?rev=1445549&r1=1445548&r2=1445549&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_multiproduct/tests/model.py (original)
+++ incubator/bloodhound/trunk/bloodhound_multiproduct/tests/model.py Wed Feb 13 10:55:40
2013
@@ -54,6 +54,23 @@ class ProductTestCase(unittest.TestCase)
         shutil.rmtree(self.env.path)
         self.env.reset_db()
     
+    def test_set_table_field(self):
+        """tests that table.field style update works"""
+        test = {'prefix': 'td',
+                'name': 'test field access',
+                'description': 'product to test field setting'}
+        
+        product = Product(self.env)
+        
+        # attempt to set the fields from the data
+        product.prefix = test['prefix']
+        product.name = test['name']
+        product.description = test['description']
+        
+        self.assertEqual(product._data['prefix'], test['prefix'])
+        self.assertEqual(product._data['name'], test['name'])
+        self.assertEqual(product._data['description'], test['description'])
+    
     def test_select(self):
         """tests that select can search Products by fields"""
         



Mime
View raw message