You should move the TrivialCache class from test_location_mapper into a helpers.py file and import it from there into both test_location_mapper and test_split_migrator.