mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 08:09:10 +02:00
Improve an assertion, remove conftest
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import pytest
|
||||
|
||||
# Custom assertions defined in the following package need to be registered to be properly
|
||||
# displayed in a pytest report when they are failing.
|
||||
pytest.register_assert_rewrite('certbot_integration_tests.certbot_tests.assertions')
|
||||
|
||||
@@ -12,8 +12,7 @@ def assert_hook_execution(probe_path, probe_content):
|
||||
with open(probe_path, 'r') as file:
|
||||
lines = file.readlines()
|
||||
|
||||
# Comparing pattern to each line avoids to match "pre" for a line with "pre-override"
|
||||
assert [line for line in lines if line == '{0}{1}'.format(probe_content, os.linesep)]
|
||||
assert '{0}{1}'.format(probe_content, os.linesep) in lines
|
||||
|
||||
|
||||
def assert_save_renew_hook(config_dir, lineage):
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import pytest
|
||||
|
||||
# Custom assertions defined in the following package need to be registered to be properly
|
||||
# displayed in a pytest report when they are failing.
|
||||
pytest.register_assert_rewrite('certbot_integration_tests.certbot_tests.assertions')
|
||||
Reference in New Issue
Block a user