mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-27 00:26:33 -06:00
Fix Pytest4.x warning about message
"message" parameter of pytest.raises is deprecated since Pytest4.1: ``` It is a common mistake to think this parameter will match the exception message, while in fact it only serves to provide a custom message in case the pytest.raises check fails. ``` That was the truth for test_unrecognised_attr_type_raises, which has wrongly checked an exception message. Fixes: https://pagure.io/freeipa/issue/7981 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
parent
d16dd2fd62
commit
9836511a2b
@ -259,7 +259,7 @@ class test_CSRGenerator:
|
||||
|
||||
with pytest.raises(
|
||||
errors.CSRTemplateError,
|
||||
message='unrecognised attribute type: X'):
|
||||
match=r'^unrecognised attribute type: X$'):
|
||||
csrgen_ffi.build_requestinfo(
|
||||
config.encode('utf-8'), adaptor.get_subject_public_key_info())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user