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>
2020-03-26 18:18:56 -05:00
..
ansible_test
integration Unify yaml style in unarchive tests to be dict-style (refs #68272) (#68477) 2020-03-26 18:02:17 -05:00
lib/ansible_test ansible-test - fix up powershell module_util analysis for collections (#68422) 2020-03-24 23:44:50 -07:00
sanity Move coding guidelines links to readme. (#68479) 2020-03-26 15:19:01 -04:00
support add readme to test/support (#68450) 2020-03-24 17:15:01 -05:00
units Fix and add tests for some module_utils.common.validation (#67771) 2020-03-26 18:18:56 -05:00
utils/shippable Update ansible-test network test provisioning. (#68220) 2020-03-23 11:14:21 -05:00