Oh nice, thank you for that tip. I was doing the opposite, `new_obj = mod.Class(...)` and then assigning the dicts from the old object (which was when I realized the pickle save/load was easier).

Pytest has a number of tools for monkeypatching in tests; rpytest.monkeypatch.setattr, setitem: https://docs.pytest.org/en/stable/how-to/monkeypatch.html

Pickles aren't signed and pickle is basically eval().