tests: shortcut is_using_postgresql() to make sure the right mode is used

This commit is contained in:
Frédéric Péters 2015-03-20 11:45:22 +01:00
parent 124a42b73c
commit 136ade48b0
1 changed files with 2 additions and 0 deletions

View File

@ -57,9 +57,11 @@ def create_temporary_pub(sql_mode=False):
if sql_mode:
pub.user_class = sql.SqlUser
pub.tracking_code_class = sql.TrackingCode
pub.is_using_postgresql = lambda: True
else:
pub.user_class = User
pub.tracking_code_class = TrackingCode
pub.is_using_postgresql = lambda: False
if os.path.exists(pub.app_dir):
pub.cfg = {}