Source code for sqlobject.tests.test_sqlmeta_idName
from sqlobject import MixedCaseStyle, SQLObject, sqlmeta
from sqlobject.tests.dbtest import setupClass
[docs]def test_sqlmeta_inherited_idName():
setupClass([SOTestSqlmeta1, SOTestSqlmeta2])
assert SOTestSqlmeta1.sqlmeta.idName == "my_id"
assert SOTestSqlmeta2.sqlmeta.idName == "SOTestSqlmeta2ID"
assert SOTestSqlmeta3.sqlmeta.idName == "my_id"
assert SOTestSqlmeta4.sqlmeta.idName == "SOTestSqlmeta4ID"
assert SOTestSqlmeta5.sqlmeta.idName == "my_id"
assert SOTestSqlmeta6.sqlmeta.idName == "SOTestSqlmeta6ID"