chore(tests): use pytest monkeypatch and fakes instead of unittest.mock