Mock a function call using pytest-mock and verify it was called with expected arguments
Preconditions (2)
Step 1: Use pytest-mock's 'mocker' fixture to mock 'fetch_data' function
Step 2: Set the mock to return a fixed dictionary {'id': 1, 'value': 'test'}
Step 3: Call the function under test that uses 'fetch_data'
Step 4: Verify that 'fetch_data' was called exactly once
Step 5: Verify that 'fetch_data' was called with no arguments
Step 6: Assert that the function under test returns the mocked data
✅ Expected Result: The test passes confirming the mock was called correctly and the function under test returns the mocked data