diff --git a/test/memorydb.py b/test/memorydb.py
index 17c8330f7c3029c86363a3603a04f1a84111e97c..cd830cbd8acee32bbbe307c25cc7c959da535ddd 100644 (file)
--- a/test/memorydb.py
+++ b/test/memorydb.py
from roundup.hyperdb import *
from roundup.support import ensureParentsExist
-def new_config():
+def new_config(debug=False):
config = configuration.CoreConfig()
config.DATABASE = "db"
#config.logging = MockNull()
# these TRACKER_WEB and MAIL_DOMAIN values are used in mailgw tests
+ if debug:
+ config.LOGGING_LEVEL = "DEBUG"
config.MAIL_DOMAIN = "your.tracker.email.domain.example"
config.TRACKER_WEB = "http://tracker.example/cgi-bin/roundup.cgi/bugs/"
return config
-def create(journaltag, create=True):
- db = Database(new_config(), journaltag)
+def create(journaltag, create=True, debug=False):
+ db = Database(new_config(debug), journaltag)
# load standard schema
schema = os.path.join(os.path.dirname(__file__),
def get(self, infoid, value, default=None):
return self[infoid].get(value, default)
def getall(self, infoid):
+ if infoid not in self:
+ raise KeyError(infoid)
return self[infoid]
def set(self, infoid, **newvalues):
self[infoid].update(newvalues)