mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-09 10:20:00 -04:00
24dd3d8c90
Fixed issue in "versioned history" example where using a declarative base that is derived from :class:`_orm.DeclarativeBase` would fail to be mapped. Additionally, repaired the given test suite so that the documented instructions for running the example using Python unittest now work again. Change-Id: I164a5b8dbdd01e3d815eb356f7b7cadf226ca296 References: #9546
32 lines
602 B
Python
32 lines
602 B
Python
import os
|
|
import sys
|
|
|
|
from sqlalchemy.testing import fixtures
|
|
|
|
|
|
here = os.path.dirname(__file__)
|
|
sqla_base = os.path.normpath(os.path.join(here, "..", ".."))
|
|
|
|
|
|
sys.path.insert(0, sqla_base)
|
|
|
|
test_versioning = __import__(
|
|
"examples.versioned_history.test_versioning"
|
|
).versioned_history.test_versioning
|
|
|
|
|
|
class VersionedRowsTestLegacyBase(
|
|
test_versioning.TestVersioning,
|
|
fixtures.RemoveORMEventsGlobally,
|
|
fixtures.TestBase,
|
|
):
|
|
pass
|
|
|
|
|
|
class VersionedRowsTestNewBase(
|
|
test_versioning.TestVersioningNewBase,
|
|
fixtures.RemoveORMEventsGlobally,
|
|
fixtures.TestBase,
|
|
):
|
|
pass
|