# Path: coaster/db.py
# def _set_sqlite_pragma(dbapi_connection, connection_record):
# def _set_postgresql_timezone(dbapi_connection, connection_record):
# 
# Path: tests/test_sqlalchemy_models.py
# class Container(BaseMixin, db.Model):
#     __tablename__ = 'container'
#     name = Column(Unicode(80), nullable=True)
#     title = Column(Unicode(80), nullable=True)
# 
#     content = Column(Unicode(250))
# 
# class NamedDocument(BaseNameMixin, db.Model):
#     __tablename__ = 'named_document'
#     reserved_names = ['new']
#     container_id = Column(Integer, ForeignKey('container.id'))
#     container = relationship(Container)
# 
#     content = Column(Unicode(250))
# 
# class ScopedNamedDocument(BaseScopedNameMixin, db.Model):
#     __tablename__ = 'scoped_named_document'
#     reserved_names = ['new']
#     container_id = Column(Integer, ForeignKey('container.id'))
#     container = relationship(Container)
#     parent = synonym('container')
# 
#     content = Column(Unicode(250))
#     __table_args__ = (UniqueConstraint('container_id', 'name'),)


import unittest
import pytest
from flask import Flask
from werkzeug.routing import BuildError
from coaster.db import db
from .test_sqlalchemy_models import Container, NamedDocument, ScopedNamedDocument





# --- Test setup --------------------------------------------------------------

app1 = Flask(__name__)
app1.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'
app1.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False

# Path: coaster/db.py
# def _set_sqlite_pragma(dbapi_connection, connection_record):
# def _set_postgresql_timezone(dbapi_connection, connection_record):
# 
# Path: tests/test_sqlalchemy_models.py
# class Container(BaseMixin, db.Model):
#     __tablename__ = 'container'
#     name = Column(Unicode(80), nullable=True)
#     title = Column(Unicode(80), nullable=True)
# 
#     content = Column(Unicode(250))
# 
# class NamedDocument(BaseNameMixin, db.Model):
#     __tablename__ = 'named_document'
#     reserved_names = ['new']
#     container_id = Column(Integer, ForeignKey('container.id'))
#     container = relationship(Container)
# 
#     content = Column(Unicode(250))
# 
# class ScopedNamedDocument(BaseScopedNameMixin, db.Model):
#     __tablename__ = 'scoped_named_document'
#     reserved_names = ['new']
#     container_id = Column(Integer, ForeignKey('container.id'))
#     container = relationship(Container)
#     parent = synonym('container')
# 
#     content = Column(Unicode(250))
#     __table_args__ = (UniqueConstraint('container_id', 'name'),)


# Path: tests/test_url_for.py
import unittest
import pytest
from flask import Flask
from werkzeug.routing import BuildError
from coaster.db import db
from .test_sqlalchemy_models import Container, NamedDocument, ScopedNamedDocument






# --- Test setup --------------------------------------------------------------

app1 = Flask(__name__)
app1.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'
app1.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False

db.init_app(app1)