Closed grantcurell closed 3 years ago
@grantcurell Please refer https://github.com/dell/dellemc-openmanage-ansible-modules/blob/collections/tests/README.md for the tests dependencies
@grantcurell Hope this solved the issue
@grantcurell Hope this solved the issue
Ah sorry man. I'll just close this out - I had already seen that but I've been working other coding projects so I haven't circled back around to try it out again. I'll close this though - I don't want it cluttering your board 😂
I'm spinning myself up on unit testing with Ansible and am struggling with the import nomenclature. I've been able to adjust a lot of it for my own environment to get it to work. However, one piece I'm missing are the following in common.py:
MagicMock
I can just import separately withunittest.mock import MagicMock
. It looks like in other collections it is bundled, but it's missing in the dellemc collection:Edit: I figured this out - I see in the docs you are meant to copy this.
I see Ansible says it should be bundled) with Ansible itself.
I also couldn't find any reference to
AnsibleFailJson
orAnsibleExitJson
in the entire project.Reading through Ansible's guide on debugging it looks like these are custom defined exceptions that should be somewhere in the project.
I can't tell if I'm missing something, particularly since I just taught myself all this, or if those definitions are missing from the project.