|
Revision 367
(checked in by fumanchu, 6 years ago)
|
Added a "managers" registry to dejavu.storage. This allows short names to be used in config instead of full class names.
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
import warnings |
|---|
| 2 |
|
|---|
| 3 |
try: |
|---|
| 4 |
import pythoncom |
|---|
| 5 |
except ImportError: |
|---|
| 6 |
def run(): |
|---|
| 7 |
warnings.warn("The pythoncom module could not be imported. " |
|---|
| 8 |
"The MSAccess test will not be run.") |
|---|
| 9 |
else: |
|---|
| 10 |
from dejavu.storage import storeado |
|---|
| 11 |
try: |
|---|
| 12 |
storeado.gen_py() |
|---|
| 13 |
except ImportError: |
|---|
| 14 |
def run(): |
|---|
| 15 |
warnings.warn("ADO 2.7 support could not be verified. " |
|---|
| 16 |
"The SQLServer test will not be run.") |
|---|
| 17 |
else: |
|---|
| 18 |
opts = {u'Connect': ("Provider=SQLOLEDB.1; Integrated Security=SSPI; " |
|---|
| 19 |
"Initial Catalog=dejavu_test; " |
|---|
| 20 |
"Data Source=(local)"), |
|---|
| 21 |
} |
|---|
| 22 |
SM_class = "sqlserver" |
|---|
| 23 |
|
|---|
| 24 |
def run(): |
|---|
| 25 |
import zoo_fixture |
|---|
| 26 |
|
|---|
| 27 |
reload(zoo_fixture) |
|---|
| 28 |
zoo_fixture.init() |
|---|
| 29 |
zoo_fixture.run(SM_class, opts) |
|---|
| 30 |
|
|---|
| 31 |
if __name__ == "__main__": |
|---|
| 32 |
run() |
|---|