From d97aa08202b79697b677d31c1fcf385afec9e6df Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 9 Sep 2022 17:38:03 +0100 Subject: tests: Define a primary key Avoids the following warning: SAWarning: Could not assemble any primary keys for locally mapped table 'fake_table_inh' - no rows will be persisted in this Table. class FakeTableJoinedInh(FakeTable): Change-Id: Ia7795be05e6364d8b2d70be70f5154094a55161a Signed-off-by: Stephen Finucane --- oslo_db/tests/sqlalchemy/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_db/tests/sqlalchemy/test_utils.py b/oslo_db/tests/sqlalchemy/test_utils.py index f519a1f..6b75796 100644 --- a/oslo_db/tests/sqlalchemy/test_utils.py +++ b/oslo_db/tests/sqlalchemy/test_utils.py @@ -93,7 +93,7 @@ class FakeTable(Base): class FakeTableJoinedInh(FakeTable): __tablename__ = 'fake_table_inh' - id = Column(String(50), ForeignKey('fake_table.user_id')) + id = Column(String(50), ForeignKey('fake_table.user_id'), primary_key=True) class FakeTableSingleInh(FakeTable): -- cgit v1.2.1