Beispiel #1
0
 def setUpClass(cls):
     super(TestSQLCache, cls).setUpClass()
     config = MagicMock()
     config.get_settings.return_value = {
         'pypi.storage': 'tests.DummyStorage',
         'db.url': 'sqlite:///:memory:',
     }
     SQLCache.configure(config)
Beispiel #2
0
 def setUpClass(cls):
     super(TestSQLCache, cls).setUpClass()
     config = MagicMock()
     config.get_settings.return_value = {
         'pypi.storage': 'tests.DummyStorage',
         'db.url': 'sqlite:///:memory:',
     }
     SQLCache.configure(config)
Beispiel #3
0
 def setUpClass(cls):
     super(TestSQLiteCache, cls).setUpClass()
     settings = {"pypi.storage": "tests.DummyStorage", "db.url": cls.DB_URL}
     try:
         cls.kwargs = SQLCache.configure(settings)
     except OperationalError:
         raise unittest.SkipTest("Couldn't connect to database")
Beispiel #4
0
 def setUpClass(cls):
     super(TestSQLCache, cls).setUpClass()
     settings = {
         'pypi.storage': 'tests.DummyStorage',
         'db.url': 'sqlite:///:memory:',
     }
     cls.kwargs = SQLCache.configure(settings)
Beispiel #5
0
 def setUpClass(cls):
     super(TestSQLiteCache, cls).setUpClass()
     settings = {"pypi.storage": "tests.DummyStorage", "db.url": cls.DB_URL}
     try:
         cls.kwargs = SQLCache.configure(settings)
     except OperationalError:
         raise unittest.SkipTest("Couldn't connect to database")
Beispiel #6
0
 def setUpClass(cls):
     super(TestSQLCache, cls).setUpClass()
     settings = {
         'pypi.storage': 'tests.DummyStorage',
         'db.url': 'sqlite:///:memory:',
     }
     cls.kwargs = SQLCache.configure(settings)
Beispiel #7
0
 def setUpClass(cls):
     super(TestSQLiteCache, cls).setUpClass()
     settings = {
         'pypi.storage': 'tests.DummyStorage',
         'db.url': cls.DB_URL,
         'db.graceful_reload': True,
     }
     try:
         cls.kwargs = SQLCache.configure(settings)
     except OperationalError:
         raise unittest.SkipTest("Couldn't connect to database")
Beispiel #8
0
 def setUpClass(cls):
     super(TestSQLiteCache, cls).setUpClass()
     db_url = cls.get_db_url()
     settings = EnvironSettings(
         {
             "pypi.storage": "tests.DummyStorage",
             "db.url": db_url
         }, {})
     try:
         cls.kwargs = SQLCache.configure(settings)
     except OperationalError:
         raise unittest.SkipTest(f"Couldn't connect to database {db_url}")
Beispiel #9
0
 def setUpClass(cls):
     super(TestSQLCache, cls).setUpClass()
     settings = {"pypi.storage": "tests.DummyStorage", "db.url": "sqlite:///:memory:"}
     cls.kwargs = SQLCache.configure(settings)