Fix cases of inconsistent namespacing in tests
Additional fixes for MarcoGorelli/PyDataGlobal2020-sprint#1.
Continues the work of lpkirwin in #37838.

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Thanks @jan-mue !