1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/units/module_utils
Toshio Kuratomi cd36164239
Porting tests to pytest (#33387)
* Porting tests to pytest

* Achievement Get: No longer need mock/generator.py
  * Now done via pytest's parametrization
  * Port safe_eval to pytest
  * Port text tests to pytest
  * Port test_set_mode_if_different to pytest

* Change conftest AnsibleModule fixtures to be more flexible
  * Move the AnsibleModules fixtures to module_utils/conftest.py for sharing
  * Testing the argspec code requires:
    * injecting both the argspec and the arguments.
    * Patching the arguments into sys.stdin at a different level

* More porting to obsolete mock/procenv.py
  * Port run_command to pytest
  * Port known_hosts tests to pytest
  * Port safe_eval to pytest
  * Port test_distribution_version.py to pytest
  * Port test_log to pytest
  * Port test__log_invocation to pytest
  * Remove unneeded import of procenv in test_postgresql

* Port test_pip to pytest style
  * As part of this, create a pytest ansiblemodule fixture in
    modules/conftest.py.  This is slightly different than the
    approach taken in module_utils because here we need to override the
    AnsibleModule that the modules will inherit from instead of one that
    we're instantiating ourselves.

* Fixup usage of parametrization in test_deprecate_warn

* Check that the pip module failed in our test
2017-12-05 12:43:13 -08:00
..
aws aws.core in new aws dir in module utils - module with AnsibleAWSModule class and fail_json_aws (#25780) 2017-07-11 14:01:35 -07:00
basic Porting tests to pytest (#33387) 2017-12-05 12:43:13 -08:00
cloud [cloud] Add more configurable backoff implementations to CloudRetry/AWSRetry (#27251) 2017-08-08 08:56:46 -04:00
ec2 AWSRetry: allow retrying on additional ClientError exceptions (#28483) 2017-08-22 15:31:20 -04:00
facts Fix invalid string escape sequences. 2017-11-21 10:03:34 -08:00
gcp Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
json_utils Port some tests away from nose as examples (#33437) 2017-11-30 14:04:09 -08:00
network Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
parsing Consolidate boolean/mk_boolean conversion functions into a single location 2017-07-17 11:48:05 -07:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
conftest.py Porting tests to pytest (#33387) 2017-12-05 12:43:13 -08:00
test_basic.py jsonify inventory (#32990) 2017-11-21 13:41:27 -08:00
test_database.py Revert "Update galaxy and database unit tests." 2017-02-09 15:19:01 -08:00
test_distribution_version.py Porting tests to pytest (#33387) 2017-12-05 12:43:13 -08:00
test_known_hosts.py Porting tests to pytest (#33387) 2017-12-05 12:43:13 -08:00
test_postgresql.py Porting tests to pytest (#33387) 2017-12-05 12:43:13 -08:00
test_text.py Porting tests to pytest (#33387) 2017-12-05 12:43:13 -08:00