Closed sugetha24 closed 1 year ago
Change the way we mock cvpApi() Something like this
@pytest.fixture def mock_cvpClient(): """ mock_cvprac - mocks cvprac classes/objects """ # mocked cvpClient object mock_cvpClient = create_autospec(CvpClient) mock_cvpClient.api = create_autospec(spec=CvpApi) mock_cvpClient.api.apply_image_to_element.side_effect = mockMagic.apply_image_to_element mock_cvpClient.api.get_image_bundle_by_name.side_effect = mockMagic.get_image_bundle_by_name return mock_cvpClient
This makes it easier to apply side_effect to any Cvprac functions on the fly
side_effect
other
NA
No response
PR for ref: https://github.com/aristanetworks/ansible-cvp/pull/572
Enhancement summary
Change the way we mock cvpApi() Something like this
This makes it easier to apply
side_effect
to any Cvprac functions on the flyWhich component of AVD is impacted
other
Use case example
NA
Describe the solution you'd like
NA
Describe alternatives you've considered
No response
Additional context
No response
Code of Conduct