# Path: flask_editablesite/settings.py
# class TestConfig(Config):
#     TESTING = True
#     DEBUG = True
#     BCRYPT_LOG_ROUNDS = 1  # For faster tests
#     WTF_CSRF_ENABLED = False  # Allows form testing
# 
# Path: flask_editablesite/app.py
# def create_app(config_object=ProdConfig):
#     """An application factory, as explained here:
#         http://flask.pocoo.org/docs/patterns/appfactories/
# 
#     :param config_object: The configuration object to use.
#     """
#     app = Flask(__name__)
#     app.config.from_object(config_object)
#     register_loggers(app)
#     register_extensions(app)
#     register_blueprints(app)
#     register_errorhandlers(app)
#     return app
# 
# Path: flask_editablesite/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(object):
# class Slugged(object):
# class TimeStamped(object):
# class Confirmable(object):
#     def create(cls, **kwargs):
#     def update(self, commit=True, **kwargs):
#     def save(self, commit=True):
#     def delete(self, commit=True):
#     def get_by_id(cls, id):
# def ReferenceCol(tablename, nullable=False, pk_name='id', **kwargs):
#     def validate_slug(self, key, value):
# def update_slug_before_save(mapper, connection, target):
#     def created_at_formatted(self):
#     def updated_at_formatted(self):
# def update_timestamps_before_insert(mapper, connection, target):
# def update_timestamps_before_update(mapper, connection, target):
#     def confirmed_at_formatted(self):
# def update_confirmedat_before_save(mapper, connection, target):
# 
# Path: tests/factories.py
# class UserFactory(BaseFactory):
#     email = Sequence(lambda n: "user{0}@example.com".format(n))
#     password = PostGenerationMethodCall('set_password', 'example')
#     active = True
# 
#     class Meta:
#         model = User


import pytest
from flask_webtest import TestApp
from flask_editablesite.settings import TestConfig
from flask_editablesite.app import create_app
from flask_editablesite.database import db as _db
from .factories import UserFactory
# -*- coding: utf-8 -*-
"""Defines fixtures available to all tests."""





@pytest.yield_fixture(scope='session')
def app():
    _app = create_app(TestConfig)
    ctx = _app.test_request_context()
    ctx.push()

    yield _app

    ctx.pop()



# Path: flask_editablesite/settings.py
# class TestConfig(Config):
#     TESTING = True
#     DEBUG = True
#     BCRYPT_LOG_ROUNDS = 1  # For faster tests
#     WTF_CSRF_ENABLED = False  # Allows form testing
# 
# Path: flask_editablesite/app.py
# def create_app(config_object=ProdConfig):
#     """An application factory, as explained here:
#         http://flask.pocoo.org/docs/patterns/appfactories/
# 
#     :param config_object: The configuration object to use.
#     """
#     app = Flask(__name__)
#     app.config.from_object(config_object)
#     register_loggers(app)
#     register_extensions(app)
#     register_blueprints(app)
#     register_errorhandlers(app)
#     return app
# 
# Path: flask_editablesite/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(object):
# class Slugged(object):
# class TimeStamped(object):
# class Confirmable(object):
#     def create(cls, **kwargs):
#     def update(self, commit=True, **kwargs):
#     def save(self, commit=True):
#     def delete(self, commit=True):
#     def get_by_id(cls, id):
# def ReferenceCol(tablename, nullable=False, pk_name='id', **kwargs):
#     def validate_slug(self, key, value):
# def update_slug_before_save(mapper, connection, target):
#     def created_at_formatted(self):
#     def updated_at_formatted(self):
# def update_timestamps_before_insert(mapper, connection, target):
# def update_timestamps_before_update(mapper, connection, target):
#     def confirmed_at_formatted(self):
# def update_confirmedat_before_save(mapper, connection, target):
# 
# Path: tests/factories.py
# class UserFactory(BaseFactory):
#     email = Sequence(lambda n: "user{0}@example.com".format(n))
#     password = PostGenerationMethodCall('set_password', 'example')
#     active = True
# 
#     class Meta:
#         model = User


# Path: tests/conftest.py
import pytest
from flask_webtest import TestApp
from flask_editablesite.settings import TestConfig
from flask_editablesite.app import create_app
from flask_editablesite.database import db as _db
from .factories import UserFactory

# -*- coding: utf-8 -*-
"""Defines fixtures available to all tests."""





@pytest.yield_fixture(scope='session')
def app():
    _app = create_app(TestConfig)
    ctx = _app.test_request_context()
    ctx.push()

    yield _app

    ctx.pop()



class SessionStoreTestConfig(TestConfig):