def setUp(self): self.room = room = Room() room.id = 'Pegasus' room.description = 'room description' room.location = Location() room.location.id = 'galaxy' room.location.description = 'In a galaxy far far away' self.category_gw = Category(id='GW')
def _create_objects_from_row(self, row): raise_if_exists(Location, id=row['locationid']) if row['parent']: parent = get_object_or_fail(Location, id=row['parent']) else: parent = None location = Location(id=row['locationid'], parent=parent, description=row['descr']) return [location]
def _create_objects_from_row(self, row): raise_if_exists(Location, id=row['locationid']) location = Location(id=row['locationid'], description=row['descr']) return [location]