[SQL-CVS] r4251 - SQLObject/trunk/sqlobject/tests
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2010-10-09 02:12:15
|
Author: phd Date: 2010-10-08 20:12:08 -0600 (Fri, 08 Oct 2010) New Revision: 4251 Added: SQLObject/trunk/sqlobject/tests/test_columns_order.py Log: Test the order of columns - they are listed now in the order of declaration. Added: SQLObject/trunk/sqlobject/tests/test_columns_order.py =================================================================== --- SQLObject/trunk/sqlobject/tests/test_columns_order.py (rev 0) +++ SQLObject/trunk/sqlobject/tests/test_columns_order.py 2010-10-09 02:12:08 UTC (rev 4251) @@ -0,0 +1,15 @@ +from sqlobject import * + +######################################## +## Columns order +######################################## + +class SOColumnsOrder(SQLObject): + name = StringCol() + surname = StringCol() + parname = StringCol() + age = IntCol() + +def test_columns_order(): + column_names = [c.name for c in SOColumnsOrder.sqlmeta.columnList] + assert column_names == ['name', 'surname', 'parname', 'age'] |