Fix obj arguments in assertions
- [x] closes #59440
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Hello @rhshadrach, thanks for your review!
I left the PR in the draft state as I feel like only the first line changed is actually tested, the two other changes didn't break any assert so I wanted to add more tests/asserts (but I didn't have time to tackle #59459 yet).
That said, I let you all decide if more work is needed here 🙂  Thanks @serl 