From e6ceb1fc50912bc103d17ca9406b2b3a5412030f Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Mon, 9 Jan 2023 16:09:09 -0800 Subject: [PATCH] file contents are accessed twice now --- .../certbot_integration_tests/certbot_tests/test_main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py index 5a2d66014..941b26382 100644 --- a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py +++ b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py @@ -823,11 +823,12 @@ def test_reconfigure(context: IntegrationTestsContext) -> None: context.certbot(['reconfigure', '--cert-name', certname, '-a', 'webroot', '--webroot-path', webroot]) with open(conf_path, 'r') as f: + file_contents = f.read() # Check changed value - assert 'authenticator = webroot' in f.read(), \ + assert 'authenticator = webroot' in file_contents, \ 'Expected authenticator to be changed to webroot in renewal config' # Check added value - assert f'webroot_path = {webroot}' in f.read(), \ + assert f'webroot_path = {webroot}' in file_contents, \ 'Expected new webroot path to be added to renewal config'