本文整理匯總了Python中extractor.Extractor.getConSettings方法的典型用法代碼示例。如果您正苦於以下問題:Python Extractor.getConSettings方法的具體用法?Python Extractor.getConSettings怎麽用?Python Extractor.getConSettings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類extractor.Extractor
的用法示例。
在下文中一共展示了Extractor.getConSettings方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testSuperCreateDumpCommand
# 需要導入模塊: from extractor import Extractor [as 別名]
# 或者: from extractor.Extractor import getConSettings [as 別名]
def testSuperCreateDumpCommand(self):
helpers = Helpers()
commander = Commander()
extractor = Extractor()
helpers.getWebConfigPath = Mock()
helpers.getDumpFilesPath = Mock()
helpers.getApp = Mock()
helpers.getWebConfigPath.return_value = 'testfiles/web.config'
helpers.getDumpFilesPath.return_value = 'db.sql'
helpers.getApp.return_value = 'mysql.exe'
extractor.getConSettings = Mock()
extractor.getConSettings.return_value = { 'server': 'localhost',
'user id' : 'geert',
'database' : 'projects',
'datalayer' : 'mysql',
'password': 'neverfails' }
args = ['path/web.config', 'path/.sql', 'path/mysql.exe']
result = usqlfetcher.superCreateDumpCommand(args, commander, helpers, extractor)
self.assertEqual(result, 'mysql.exe -ugeert -pneverfails -hlocalhost projects')