Include test_build_data_with_flatten inside class