~ubuntu-branches/ubuntu/saucy/beaker/saucy

« back to all changes in this revision

Viewing changes to tests/test_database.py

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski
  • Date: 2010-03-03 00:37:43 UTC
  • mfrom: (1.1.16 upstream) (2.1.18 sid)
  • Revision ID: james.westby@ubuntu.com-20100303003743-ydl9a2st185leauo
Tags: 1.5.3-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# coding: utf-8
2
2
from beaker.cache import clsmap, Cache
 
3
from beaker.exceptions import InvalidCacheBackendError
3
4
from beaker.middleware import CacheMiddleware
4
5
from nose import SkipTest
5
6
from webtest import TestApp
6
7
 
7
 
if isinstance(clsmap.get('ext:database'), Exception):
8
 
    raise SkipTest("'sqlalchemy' is not installed, can't test database "
9
 
                   "backend")
 
8
 
 
9
try:
 
10
    clsmap['ext:database']._init_dependencies()
 
11
except InvalidCacheBackendError:
 
12
    raise SkipTest("an appropriate SQLAlchemy backend is not installed")
10
13
 
11
14
db_url = 'sqlite:///test.db'
12
15