Commit Graph

5 Commits (c7334ea92cb061fc9dd8cc7ed41d0c7e15440eb9)

Author SHA1 Message Date
Matt Clay 9f899f9492
Require `from __future__ import annotations` (#81902) 9 months ago
Arne de Laat 070ce87440
Add test for symbolic to octal when others is omitted (#80822)
* Add test for symbolic to octal when others is omitted

Add case when there should be no permissions for other.
And specific permissions for owner and group.

* Fix permissions test by explicitly setting no permissions for others

* Add additional cases where multiple permissions are specified
1 year ago
Matt Clay 98a0995fd0 Clean up unit test boilerplate. 4 years ago
Toshio Kuratomi 370a7ace4b
Split basic units (#33510)
Split the one monolithic test for basic.py into several files

* Split test_basic.py along categories.
  This is preliminary to get a handle on things.  Eventually we may want
  to further split it so each file is only testing a single function.
* Cleanup unused imports from splitting test_basic.py
* Port atomic_move test to pytest.
  Working on getting rid of need to maintain procenv
* Split a test of symbolic_mode_to_octal to follow unittest best practices
  Each test should only invoke the function under test once
* Port test_argument_spec to pytest.
* Fix suboptions failure
7 years ago
Toshio Kuratomi 47f26ee11c Refactor the tests for _symbolic_mode_to_octal
* Move tests to their own file
* Port to a pytest parametrized test so it's easier to define new tests
* Now that _symbolic_mode_to_octal is a classmethod, we don't have to
  instantiate an AnsibleModule to test it.
* Add tests for #14994, having more than one operator per role and umask
  chmod
7 years ago