Changeset 3758
- Timestamp:
- 11/25/07 12:28:51 (8 months ago)
- Files:
-
- branches/1.0/CHANGELOG.txt (modified) (2 diffs)
- branches/1.0/turbogears/testutil.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/CHANGELOG.txt
r3756 r3758 3 3 4 4 5 1.0.4 :5 1.0.4b3: 6 6 ---------------------------- 7 7 … … 61 61 * Fix pagination of out of bound pages (#1617). 62 62 * ``tg-admin i18n`` now supports Unicode strings in Kid templates (#1397). 63 * Fixed testutil to properly use the soClasses attribute in the model 64 in order to pick up only the classes defined in this list and not 65 the rest. Thanks to Gregor Horvath for this suggestion. (#1586). 63 66 64 67 Project Updates branches/1.0/turbogears/testutil.py
r3617 r3758 160 160 model = None 161 161 162 def _get_soClasses(self): 163 try: 164 return [self.model.__dict__[x] for x in self.model.soClasses] 165 166 except AttributeError: 167 return self.model.__dict__.values() 168 162 169 def setUp(self): 163 170 if not self.model: … … 166 173 raise "Unable to run database tests without a model" 167 174 168 for item in self. model.__dict__.values():175 for item in self._get_soClasses(): 169 176 if isinstance(item, types.TypeType) and issubclass(item, 170 177 sqlobject.SQLObject) and item != sqlobject.SQLObject \ … … 174 181 def tearDown(self): 175 182 database.rollback_all() 176 for item in self. model.__dict__.values():183 for item in self._get_soClasses(): 177 184 if isinstance(item, types.TypeType) and issubclass(item, 178 185 sqlobject.SQLObject) and item != sqlobject.SQLObject \