community.general/lib/ansible
RobW3LGA bb50fc3889 construct_deep_url() (#53475)
* Updates aci.py with the ability to add ACI objects to any depth

Changes start at line 411 (construct_deep_url() and supporting functions). One minor change to line 633 (the original construct_url()) to provide for testability:  ...join(sorted(self.child_classes)) vs ...join(self.child_classes)

I am also attaching two test files. One characterizing the existing construct_url() and the matching test set for construct_deep_url() to support my efforts and proof of parity

* Two PyTest files to support construct_deep_url

These two files provide testing parity, one characterizing the original construct_url() function and the other proofing construct_deep_url(). The ...deep_url.py test file goes five layers deep to provide better validation for the function

* Correcting previous upload to incorrect folder

These two files provide testing parity, one characterizing the original construct_url() function and the other proofing construct_deep_url(). The ...deep_url.py test file goes five layers deep to provide better validation for the function

* Deleting for file name change per Matt Clay

* Deleting for file name change per Matt Clay

* Correcting file names per Matt Clay

@mattclay Thanks again for your continued guidance and patience. Please cancel the previous (incorrect) request

* Wrong location for test file

* Wrong location for test file

* First attempt to comply with suggestions

lib/ansible/module_utils/network/aci/aci.py:517:0: SyntaxWarning: "is not" with a literal. Did you mean "!="?
lib/ansible/module_utils/network/aci/aci.py:534:0: SyntaxWarning: "is not" with a literal. Did you mean "!="?
lib/ansible/module_utils/network/aci/aci.py:558:161: E501 line too long (210 > 160 characters)

* First attempt to comply with suggestions

test/units/module_utils/network/aci/test_aci_construct_url.py:1:14: SyntaxError: import pytest
test/units/module_utils/network/aci/test_aci_deep_url.py:1:14: SyntaxError: import pytest
test/units/module_utils/network/aci/test_aci_construct_url.py:0:0: use "\n" for line endings instead of "\r\n"
test/units/module_utils/network/aci/test_aci_deep_url.py:0:0: use "\n" for line endings instead of "\r\n"
Shortened test function names (less descriptive)

* Second attempt to comply with suggestions

* Second attempt to comply with suggestions

* Third attempt to comply with suggestions

* Third attempt to comply with suggestions

* Pro Tip: Convert from 'CRLF' to 'LF' in VSCode

It's on the status bar to the right

* Added setup() support for tests

* Continued corrections to support testing

* Added two mocks to support testing

I could not find where to place fakes/mocks, so please let me know if the current location is incorrect

* Adding tmpdir property to mock_basic.py

* Added last blank line to mock_basic.py

To pass sanity test

* Attempt to correct setup() issues

* Attempt to correct setup() issues

* Attempt to correct setup() issues

* Attempt to correct setup() issues

* Withdrawing pending injectability tweak to aci.py

* Withdrawing pending injectability tweak to aci.py

* Withdrawing pending injectability tweak to aci.py

* Withdrawing pending injectability tweak to aci.py
2019-05-23 00:46:43 +02:00
..
cli fix collection adjacent loading with --playbook-dir (#56194) 2019-05-22 11:06:54 -04:00
compat Update bundled copy of selectors2 from 1.1.0 to 1.1.1 (#55457) 2019-04-23 11:52:24 -05:00
config removed previouslly deprecated settings (#55662) 2019-05-15 16:36:30 -04:00
errors Catch sshpass authentication errors and don't retry multiple times to prevent account lockout (#50776) 2019-01-23 11:32:25 -05:00
executor Templar: encapsulate _available_variables (#55435) 2019-05-20 11:49:54 -04:00
galaxy Update galaxy cli metadata file templates (#51398) 2019-02-22 00:54:02 -05:00
inventory The InventoryData class does not have a get_vars method and InventoryManager's get_vars never appears to have been used (#56804) 2019-05-22 13:56:47 -04:00
module_utils construct_deep_url() (#53475) 2019-05-23 00:46:43 +02:00
modules openssl_pkcs12: fix crash due to wrong path used for loading key in check mode (#56808) 2019-05-22 23:34:42 +02:00
parsing Migrate command line parsing to argparse (#50610) 2019-04-23 13:54:39 -05:00
playbook Improvement on setting VALID_INCLUDE_KEYWORDS on HandlerTaskInclude (#56801) 2019-05-22 15:24:25 -05:00
plugins added missing version_added 2019-05-22 17:04:36 -04:00
template Templar: encapsulate _available_variables (#55435) 2019-05-20 11:49:54 -04:00
utils Fix loading namespaced doc_fragments from collections (#55249) 2019-05-02 21:15:57 -04:00
vars Templar: encapsulate _available_variables (#55435) 2019-05-20 11:49:54 -04:00
__init__.py
constants.py removed previouslly deprecated settings (#55662) 2019-05-15 16:36:30 -04:00
context.py Become plugins (#50991) 2019-02-11 11:27:44 -06:00
release.py Cleanup the tree for post-2.8-branch 2019-04-12 12:57:35 -07:00