当前位置: 首页>>代码示例>>Python>>正文


Python integration.TextFileAssertHelper类代码示例

本文整理汇总了Python中common.integration.TextFileAssertHelper的典型用法代码示例。如果您正苦于以下问题:Python TextFileAssertHelper类的具体用法?Python TextFileAssertHelper怎么用?Python TextFileAssertHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TextFileAssertHelper类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: assert_contents_of_procs_file

 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'))
开发者ID:isdressm,项目名称:php-buildpack-TSDB,代码行数:8,代码来源:components.py

示例2: assert_start_script_is_correct

 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
开发者ID:isdressm,项目名称:php-buildpack-TSDB,代码行数:8,代码来源:components.py

示例3: assert_contents_of_env_file

 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'))
开发者ID:isdressm,项目名称:php-buildpack-TSDB,代码行数:8,代码来源:components.py

示例4: assert_start_script_is_correct

 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'))
开发者ID:KKraljic,项目名称:buildpack-php-lucid64,代码行数:8,代码来源:components.py

示例5: assert_downloads_from_output

 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:'))
开发者ID:isdressm,项目名称:php-buildpack-TSDB,代码行数:9,代码来源:components.py

示例6: assert_files_installed

 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'))
开发者ID:Appdynamics,项目名称:php-buildpack,代码行数:16,代码来源:components.py

示例7: assert_files_installed

 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'))
开发者ID:gilliganmn,项目名称:cf-php-build-pack,代码行数:22,代码来源:components.py

示例8: assert_server_ini_contains

 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))
开发者ID:isdressm,项目名称:php-buildpack-TSDB,代码行数:6,代码来源:components.py


注:本文中的common.integration.TextFileAssertHelper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。