diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2022-09-09 17:38:03 +0100 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2022-09-09 17:38:03 +0100 |
commit | d97aa08202b79697b677d31c1fcf385afec9e6df (patch) | |
tree | c9a7cc26365c54e209b9f63d1b715d5d65b365ce /oslo_db/tests/sqlalchemy | |
parent | 437a19703d63801997f2ccece516a2790d438cee (diff) | |
download | oslo-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>
Diffstat (limited to 'oslo_db/tests/sqlalchemy')
-rw-r--r-- | oslo_db/tests/sqlalchemy/test_utils.py | 2 |
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): |