Changeset 8296 for django/trunk/tests/regressiontests/backends
- Timestamp:
- 08/11/08 07:11:25 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/tests/regressiontests/backends/models.py
r7294 r8296 16 16 return u'%s %s' % (self.first_name, self.last_name) 17 17 18 if connection.features.uses_case_insensitive_names:19 t_convert = lambda x: x.upper()20 else:21 t_convert = lambda x: x22 18 qn = connection.ops.quote_name 23 19 … … 30 26 >>> f1, f2 = opts.get_field('root'), opts.get_field('square') 31 27 >>> query = ('INSERT INTO %s (%s, %s) VALUES (%%s, %%s)' 32 ... % ( t_convert(opts.db_table), qn(f1.column), qn(f2.column)))28 ... % (connection.introspection.table_name_converter(opts.db_table), qn(f1.column), qn(f2.column))) 33 29 >>> cursor.executemany(query, [(i, i**2) for i in range(-5, 6)]) and None or None 34 30 >>> Square.objects.order_by('root') … … 49 45 >>> f3, f4 = opts2.get_field('first_name'), opts2.get_field('last_name') 50 46 >>> query2 = ('SELECT %s, %s FROM %s ORDER BY %s' 51 ... % (qn(f3.column), qn(f4.column), t_convert(opts2.db_table),47 ... % (qn(f3.column), qn(f4.column), connection.introspection.table_name_converter(opts2.db_table), 52 48 ... qn(f3.column))) 53 49 >>> cursor.execute(query2) and None or None
