Work in progress: refactoring test_recordtype