本文整理汇总了Python中common.integration.TextFileAssertHelper.expect方法的典型用法代码示例。如果您正苦于以下问题:Python TextFileAssertHelper.expect方法的具体用法?Python TextFileAssertHelper.expect怎么用?Python TextFileAssertHelper.expect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.integration.TextFileAssertHelper
的用法示例。
在下文中一共展示了TextFileAssertHelper.expect方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: assert_contents_of_procs_file
# 需要导入模块: from common.integration import TextFileAssertHelper [as 别名]
# 或者: from common.integration.TextFileAssertHelper import expect [as 别名]
def assert_contents_of_procs_file(self, build_dir):
fah = FileAssertHelper()
fah.expect().path(build_dir, '.procs').exists()
tfah = TextFileAssertHelper()
(tfah.expect()
.on_file(build_dir, '.procs')
.line(0)
.equals('php-app: $HOME/php/bin/php -c "$HOME/php/etc" app.php\n'))
示例2: assert_start_script_is_correct
# 需要导入模块: from common.integration import TextFileAssertHelper [as 别名]
# 或者: from common.integration.TextFileAssertHelper import expect [as 别名]
def assert_start_script_is_correct(self, build_dir):
fah = FileAssertHelper()
fah.expect().path(build_dir, '.profile.d/rewrite.sh').exists()
tfah = TextFileAssertHelper()
(tfah.expect()
.on_file(build_dir, '.profile.d/rewrite.sh')
.line(0)
.contains('export PYTHONPATH=$HOME/.bp/lib')) # noqa
示例3: assert_contents_of_env_file
# 需要导入模块: from common.integration import TextFileAssertHelper [as 别名]
# 或者: from common.integration.TextFileAssertHelper import expect [as 别名]
def assert_contents_of_env_file(self, build_dir):
fah = FileAssertHelper()
fah.expect().path(build_dir, '.profile.d', 'bp_env_vars.sh').exists()
tfah = TextFileAssertHelper()
(tfah.expect()
.on_file(build_dir, '.profile.d', 'bp_env_vars.sh')
.any_line()
.equals('export [email protected]\n'))
示例4: assert_start_script_is_correct
# 需要导入模块: from common.integration import TextFileAssertHelper [as 别名]
# 或者: from common.integration.TextFileAssertHelper import expect [as 别名]
def assert_start_script_is_correct(self, build_dir):
fah = FileAssertHelper()
fah.expect().path(build_dir, 'start.sh').exists()
tfah = TextFileAssertHelper()
(tfah.expect()
.on_file(build_dir, 'start.sh')
.any_line()
.equals('$HOME/.bp/bin/rewrite "$HOME/nginx/conf"\n'))
示例5: assert_downloads_from_output
# 需要导入模块: from common.integration import TextFileAssertHelper [as 别名]
# 或者: from common.integration.TextFileAssertHelper import expect [as 别名]
def assert_downloads_from_output(self, output):
tfah = TextFileAssertHelper()
(tfah.expect()
.on_string(output)
.line_count_equals(6, lambda l: l.startswith('Downloaded'))
.line_count_equals(1, lambda l: l.startswith('No Web'))
.line_count_equals(1, lambda l: l.startswith('Installing PHP'))
.line_count_equals(1, lambda l: l.find('php-cli') >= 0)
.line(-1).startswith('Finished:'))
示例6: assert_files_installed
# 需要导入模块: from common.integration import TextFileAssertHelper [as 别名]
# 或者: from common.integration.TextFileAssertHelper import expect [as 别名]
def assert_files_installed(self, build_dir):
fah = FileAssertHelper()
(fah.expect()
.root(build_dir, 'appdynamics') # noqa
.path('daemon', 'appdynamics-daemon.x64')
.path('agent', 'x64', 'appdynamics-20121212.so')
.exists())
tfah = TextFileAssertHelper()
(tfah.expect()
.on_file(build_dir, 'php', 'etc', 'php.ini')
.any_line()
.equals(
'[email protected]{HOME}/appdynamics/agent/x64/appdynamics-20121212.so\n')
.equals('[appdynamics]\n')
.equals('appdynamics.license=JUNK_LICENSE\n')
.equals('appdynamics.appname=app-name-1\n'))
示例7: assert_files_installed
# 需要导入模块: from common.integration import TextFileAssertHelper [as 别名]
# 或者: from common.integration.TextFileAssertHelper import expect [as 别名]
def assert_files_installed(self, build_dir):
fah = FileAssertHelper()
(fah.expect()
.root(build_dir, 'codizy', 'client', 'application')
.path('setup.php') # noqa
.path('class', 'Codizy_utils.php')
.root(build_dir, 'php', 'lib', 'php', 'extensions',
'no-debug-non-zts-20100525', reset=True)
.path('xhprof.so')
.path('ioncube.so')
.path('codizy.so')
.path('curl.so')
.path('gettext.so')
.path('mbstring.so')
.path('openssl.so')
.exists())
tfah = TextFileAssertHelper()
(tfah.expect()
.on_file(build_dir, 'php', 'etc', 'php.ini')
.any_line()
.equals('auto_prepend_file = '
'@{HOME}/codizy/client/application/setup.php\n'))
示例8: assert_server_ini_contains
# 需要导入模块: from common.integration import TextFileAssertHelper [as 别名]
# 或者: from common.integration.TextFileAssertHelper import expect [as 别名]
def assert_server_ini_contains(self, build_dir, expected_listener):
tfah = TextFileAssertHelper()
(tfah.expect()
.on_file(build_dir, 'hhvm', 'etc', 'server.ini')
.any_line()
.contains(expected_listener))