file contents are accessed twice now

This commit is contained in:
Erica Portnoy 2023-01-09 16:09:09 -08:00
parent edd78d7c1c
commit e6ceb1fc50

View file

@ -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'