Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class Base(DeclarativeBase):


class TestModel(Base):
__test__ = False

"""Basic test model for SQLAlchemy ORM functionality"""
__tablename__ = 'sqlalchemy_test_model'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class Base(DeclarativeBase):
pass

class TestModel(Base):
__test__ = False

"""Basic test model for SQLAlchemy ORM functionality"""
__tablename__ = 'sqlalchemy_test_model'

Expand Down Expand Up @@ -120,6 +122,8 @@ def _build_url(user, password, host, port, dbname, wrapper_plugins=None, **extra
query_params = {}
if wrapper_plugins:
query_params['wrapper_plugins'] = wrapper_plugins
else:
query_params['wrapper_plugins'] = ''
query_params['connect_timeout'] = str(extra_options.get('connect_timeout', 10))
for k, v in extra_options.items():
if k != 'connect_timeout':
Expand Down Expand Up @@ -268,7 +272,7 @@ def sa_models(self, sa_setup):
Base.metadata.create_all(engine, tables=[
TestModel.__table__, DataTypeModel.__table__,
Author.__table__, Book.__table__
])
], checkfirst=False)

models = {
'TestModel': TestModel,
Expand Down
Loading