Exemple #1
0
 def test_del_source_dependent(self):
     config = ODBCConfig()
     config.add_source("testdb", self.ACCESS_CONFIGSTR)
     config.add_source_spec("testdb", {'Database' : "testdb.mdb"})
     config.del_source("testdb")
     self.assertEquals({}, config.sources)
     self.assertEquals({}, config.source_specs)
Exemple #2
0
 def test_add_source_reserved(self):
     config = ODBCConfig()
     with self.assertRaises(ODBCError):
         config.add_source("ODBC Data Sources", self.ACCESS_CONFIGSTR)
     with self.assertRaises(ODBCError):
         config.add_source("ODBC", self.ACCESS_CONFIGSTR)
Exemple #3
0
 def test_add_source(self):
     config = ODBCConfig()
     config.add_source("testdb", self.ACCESS_CONFIGSTR)
     self.assertEquals({'testdb' : self.ACCESS_CONFIGSTR}, config.sources)
     self.assertEquals({}, config.source_specs)
     self.assertEquals({}, config.odbc_info)
Exemple #4
0
 def test_add_source_spec(self):
     config = ODBCConfig()
     config.add_source("testdb", self.ACCESS_CONFIGSTR)
     config.add_source_spec("testdb", {'Database' : "testdb.mdb"})
     self.assertEquals({'testdb' : {'Database' : "testdb.mdb"}}, config.source_specs)