Changeset 1561
- Timestamp:
- 16 Mar 2007, 03:45:15 (18 years ago)
- Location:
- WAeUP_SRP/branches/uli
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/uli/profiles/default/accommodation.xml
r1410 r1561 1 1 <?xml version="1.0"?> 2 2 <?xml-stylesheet type="text/xsl" href="catalog.xsl"?> 3 <object name="portal_catalog" meta_type=" WAeUP Table">3 <object name="portal_catalog" meta_type="CMF Catalog"> 4 4 <column value="bed"/> 5 5 <column value="bed_type"/> -
WAeUP_SRP/branches/uli/tests/test_tables.py
r404 r1561 24 24 25 25 # Test that data does not go away on reinstall 26 def test_ install(self):26 def test_accomodation_install(self): 27 27 # Make sure the table got installed properly 28 28 patool = self.portal.portal_accommodation 29 29 self.failUnlessEqual(patool.meta_type, 'WAeUP Accommodation Tool') 30 self.failUnlessEqual(patool.schema(), ['bed', 'student']) 31 self.failUnlessEqual(patool.indexes(), ['bed', 'student']) 30 schemalist = patool.schema() 31 schemalist.sort() 32 self.failUnlessEqual(schemalist, ['bed', 'bed_type', 'hall', 'student']) 33 indexeslist = patool.indexes() 34 indexeslist.sort() 35 self.failUnlessEqual(indexeslist, ['bed', 'bed_type', 'hall', 'student']) 32 36 33 def test_a dd_change_delete(self):37 def test_accomodation_add_change_delete(self): 34 38 patool = self.portal.portal_accommodation 35 39 36 40 # Add 37 uid = patool.addRecord(bed='bed', student='student')41 uid = patool.addRecord(bed='bed', bed_type='fresh', hall='hall', student='student') 38 42 result = patool.searchResults({'bed':'bed'}) 39 43 self.failUnlessEqual(len(result), 1) 44 self.failUnlessEqual(result[0].hall, 'hall') 40 45 self.failUnlessEqual(result[0].student, 'student') 46 self.failUnlessEqual(result[0].bed, 'bed') 47 self.failUnlessEqual(result[0].bed_type, 'fresh') 41 48 42 49 # Change 43 patool.modifyRecord( uid, student='newstudent')50 patool.modifyRecord(bed=uid, student='newstudent') 44 51 result = patool.searchResults({'bed':'bed'}) 45 52 self.failUnlessEqual(len(result), 1)
Note: See TracChangeset for help on using the changeset viewer.