# Path: papaye/factories/models.py
# class RootFactory(factory.Factory):
#     class Meta:
# class PackageFactory(factory.Factory):
#     class Meta:
# class ReleaseFactory(factory.Factory):
#     class Meta:
# class ReleaseFileFactory(factory.Factory):
#     class Meta:
# 
# Path: papaye/tests/tools.py
# def set_database_connection(request, blob_dir=None, config=None):
#     if not blob_dir:
#         blob_dir = tempfile.mkdtemp('blobs')
#     conn = get_db_connection(blob_dir)
#     request._primary_zodb_conn = conn
#     if config:
#         import transaction
#         conn.root()['repository'] = {}
#         conn.root()['user'] = {}
#         transaction.commit()
#         config.registry._zodb_databases = {'': conn._db}
#     return blob_dir


import mock
import shutil
import unittest
        import transaction
from mock import patch
from pyramid import testing
from pyramid.config import Configurator
from pyramid.threadlocal import get_current_request
from repoze.evolution import ZODBEvolutionManager
from papaye.factories import models as factories
from papaye.tests.tools import set_database_connection
        from papaye.config.startup import check_database_config
        from papaye.config.startup import check_database_config
        from pyramid.config import ConfigurationError
        from papaye.config.startup import check_database_config
        from pyramid.config import ConfigurationError
    from papaye.config.startup import start_scheduler
    from papaye.config.utils import SettingsReader
    from papaye.config.startup import start_scheduler
    from papaye.tasks.devices import DummyScheduler
    from papaye.config.utils import SettingsReader
    from papaye.config.startup import start_scheduler
    from papaye.tasks.devices import DummyScheduler
    from papaye.config.utils import SettingsReader




class ConfigTest(unittest.TestCase):

    def setUp(self):
        self.request = testing.DummyRequest()
        self.config = testing.setUp(request=self.request)

# Path: papaye/factories/models.py
# class RootFactory(factory.Factory):
#     class Meta:
# class PackageFactory(factory.Factory):
#     class Meta:
# class ReleaseFactory(factory.Factory):
#     class Meta:
# class ReleaseFileFactory(factory.Factory):
#     class Meta:
# 
# Path: papaye/tests/tools.py
# def set_database_connection(request, blob_dir=None, config=None):
#     if not blob_dir:
#         blob_dir = tempfile.mkdtemp('blobs')
#     conn = get_db_connection(blob_dir)
#     request._primary_zodb_conn = conn
#     if config:
#         import transaction
#         conn.root()['repository'] = {}
#         conn.root()['user'] = {}
#         transaction.commit()
#         config.registry._zodb_databases = {'': conn._db}
#     return blob_dir


# Path: papaye/tests/test_config.py
import mock
import shutil
import unittest
        import transaction
from mock import patch
from pyramid import testing
from pyramid.config import Configurator
from pyramid.threadlocal import get_current_request
from repoze.evolution import ZODBEvolutionManager
from papaye.factories import models as factories
from papaye.tests.tools import set_database_connection
        from papaye.config.startup import check_database_config
        from papaye.config.startup import check_database_config
        from pyramid.config import ConfigurationError
        from papaye.config.startup import check_database_config
        from pyramid.config import ConfigurationError
    from papaye.config.startup import start_scheduler
    from papaye.config.utils import SettingsReader
    from papaye.config.startup import start_scheduler
    from papaye.tasks.devices import DummyScheduler
    from papaye.config.utils import SettingsReader
    from papaye.config.startup import start_scheduler
    from papaye.tasks.devices import DummyScheduler
    from papaye.config.utils import SettingsReader





class ConfigTest(unittest.TestCase):

    def setUp(self):
        self.request = testing.DummyRequest()
        self.config = testing.setUp(request=self.request)

        self.blob_dir = set_database_connection(