TST: Fix tests in test_core.py