瀏覽代碼

Fix missing default test config

oz123 10 年之前
父節點
當前提交
89172e47a5
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 1 0
      pwman/data/drivers/sqlite.py
  2. 6 0
      pwman/tests/test_tools.py

+ 1 - 0
pwman/data/drivers/sqlite.py

@@ -67,6 +67,7 @@ class SQLiteDatabaseNewForm(Database):
 
     def _open(self):
         #try:
+        print(self._filename)
         self._con = sqlite.connect(self._filename)
         self._cur = self._con.cursor()
         self._checktables()

+ 6 - 0
pwman/tests/test_tools.py

@@ -55,6 +55,12 @@ class DummyCallback4(Callback):
         return u'newsecret'
 
 
+default_config['Database'] = {'type': 'SQLite',
+                              'filename':
+                              os.path.join(os.path.dirname(__file__),
+                                           "test.pwman.db")
+                              }
+
 class SetupTester(object):
 
     def __init__(self, dbver=None, filename=None):