You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test
Rick Elrod 3c3ffc09c2
Fix and add tests for some module_utils.common.validation (#67771)
* Fix test_check_mutually_exclusive exception-checking

Asserting inside of the `with` context of `pytest.raises`
doesn't actually have any effect. So we move the assert
out, using the exception that gets placed into the scope
after we leave the context, and ensure that it actually gets
checked.

This is also what the pytest documentation says to do:
https://docs.pytest.org/en/latest/assert.html#assertions-about-expected-exceptions

Signed-off-by: Rick Elrod <rick@elrod.me>

* Add some tests for check_required_together

Signed-off-by: Rick Elrod <rick@elrod.me>

* use to_native instead of str, for consistency

Signed-off-by: Rick Elrod <rick@elrod.me>

* Add newlines for pep8

Signed-off-by: Rick Elrod <rick@elrod.me>

* Add tests for check_required_arguments

Signed-off-by: Rick Elrod <rick@elrod.me>

* Sort missing keys in error message, since hashes are unsorted and this can be random

Signed-off-by: Rick Elrod <rick@elrod.me>

* Add changelog entry

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
..
ansible_test Relocate ansible-test self tests outside package. (#61255) 5 years ago
integration Unify yaml style in unarchive tests to be dict-style (refs #68272) (#68477) 5 years ago
lib/ansible_test ansible-test - fix up powershell module_util analysis for collections (#68422) 5 years ago
sanity Move coding guidelines links to readme. (#68479) 5 years ago
support add readme to test/support (#68450) 5 years ago
units Fix and add tests for some module_utils.common.validation (#67771) 5 years ago
utils/shippable Update ansible-test network test provisioning. (#68220) 5 years ago