That old database test code is pretty terrible. Replacing it and also obviating the test code entirely by making a whole database of test data. Or two.