def test_get_file_names_second_format(self):
        data_set = DataSet()
        path.isfile = MagicMock()
        path.isfile.return_value = False

        data_set.data = pd.DataFrame({
            "File name root": ["root1", "root2", "root3"],
            "Day Code": ["dir1", "dir2", "dir3"],
            "LF Sensor No.": ["_lf_suffix1", "_lf_suffix2", "_lf_suffix3"],
            "RF Sensor No.": ["_rf_suffix1", "_rf_suffix2", "_rf_suffix3"],
            "P Sensor No.": ["_p_suffix1", "_p_suffix2", "_p_suffix3"]
        })

        correct_result = [{
            "lf_sensor": "dir1_Exported/dir1_root1_lf_suffix1",
            "rf_sensor": "dir1_Exported/dir1_root1_rf_suffix1",
            "p_sensor": "dir1_Exported/dir1_root1_p_suffix1"
        }, {
            "lf_sensor": "dir2_Exported/dir2_root2_lf_suffix2",
            "rf_sensor": "dir2_Exported/dir2_root2_rf_suffix2",
            "p_sensor": "dir2_Exported/dir2_root2_p_suffix2"
        }, {
            "lf_sensor": "dir3_Exported/dir3_root3_lf_suffix3",
            "rf_sensor": "dir3_Exported/dir3_root3_rf_suffix3",
            "p_sensor": "dir3_Exported/dir3_root3_p_suffix3"
        }]

        data_set.calc_data_files()

        for i in range(3):
            result = data_set.get_data_files(i)
            for key in correct_result[i]:
                self.assertEqual(
                    data_set.data_dir + correct_result[i][key] + ".txt",
                    result[key])
    def test_get_data_files(self):
        data_set = DataSet()
        data_set.data = pd.DataFrame({
            "lf_sensor": [1, 2, 3],
            "rf_sensor": [4, 5, 6],
            "p_sensor": [7, 8, 9]
        })
        correct_result = {"lf_sensor": 2, "rf_sensor": 5, "p_sensor": 8}

        result = data_set.get_data_files(1)

        for key in correct_result:
            self.assertEqual(correct_result[key], result[key])