summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2022-09-09 17:38:03 +0100
committerStephen Finucane <stephenfin@redhat.com>2022-09-09 17:38:03 +0100
commitd97aa08202b79697b677d31c1fcf385afec9e6df (patch)
treec9a7cc26365c54e209b9f63d1b715d5d65b365ce
parent437a19703d63801997f2ccece516a2790d438cee (diff)
downloadoslo-db-d97aa08202b79697b677d31c1fcf385afec9e6df.tar.gz
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 <stephenfin@redhat.com>
-rw-r--r--oslo_db/tests/sqlalchemy/test_utils.py2
1 files changed, 1 insertions, 1 deletions
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):