buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccmutil.py
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 645 b8d81fa19e7d
--- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccmutil.py	Wed Jun 16 16:51:40 2010 +0300
+++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccmutil.py	Fri Aug 13 14:59:05 2010 +0300
@@ -46,7 +46,7 @@
         dbpath = "ccm.database.path"
         try:
             session = ccmutil.get_session(database, username, password, engine, dbpath)
-        except Exception:
+        except ccm.CCMException:
             print "Error creating session"
         assert session is None
             
@@ -60,7 +60,7 @@
         dbpath = "ccm.database.path"
         try:
             session = ccmutil.get_session(database, username, password, engine, dbpath)
-        except Exception:
+        except ccm.CCMException:
             print "Error creating session"
         assert session is None
 
@@ -72,7 +72,10 @@
         
 class MockSession(ccm.AbstractSession):
     """ Fake session used to test """
-    def __init__(self, behave = {}, username=None, password=None, engine=None, dbpath=None, database=None):
+    def __init__(self, behave=None, username=None, password=None, engine=None, dbpath=None, database=None):
+        ccm.AbstractSession.__init__(self, username, engine, dbpath, None)
+        if behave == None:
+            behave = {}
         if database == "fakedb":
             self._behave = behave
             self._database = database