def test_check_mapping_data_valid_data(self): """ Returns expected dict with valid data supplied """ mapping_data = [ 'Sample1\tAAAA\tACTG\tFile1\ts.1'.split('\t'), 'Sample2\tCCCC\tACTG\tFile2\ts.2'.split('\t'), 'Sample3\tTTTT\tACTG\tFile3\ts.3'.split('\t') ] headers = [ 'SampleID', 'BarcodeSequence', 'LinkerPrimerSequence', 'InputFileNames', 'Description' ] filename_column = 'InputFileNames' expected_data = { 'File3': 'Sample3', 'File2': 'Sample2', 'File1': 'Sample1' } actual_data = check_mapping_data(mapping_data, headers, filename_column) self.assertEqual(actual_data, expected_data)
def test_check_mapping_data_valid_data(self): """ Returns expected dict with valid data supplied """ mapping_data = ['Sample1\tFile1', 'Sample2\tFile2', 'Sample3\tFile3'] expected_data = { 'File3': 'Sample3', 'File2': 'Sample2', 'File1': 'Sample1' } actual_data = check_mapping_data(mapping_data) self.assertEqual(actual_data, expected_data)
def test_check_mapping_data_valid_data(self): """ Returns expected dict with valid data supplied """ mapping_data = ['Sample1\tFile1', 'Sample2\tFile2', 'Sample3\tFile3' ] expected_data = {'File3': 'Sample3', 'File2': 'Sample2', 'File1': 'Sample1'} actual_data = check_mapping_data(mapping_data) self.assertEqual(actual_data, expected_data)
def test_check_mapping_data_valid_data(self): """ Returns expected dict with valid data supplied """ mapping_data = [ "Sample1\tAAAA\tACTG\tFile1\ts.1".split("\t"), "Sample2\tCCCC\tACTG\tFile2\ts.2".split("\t"), "Sample3\tTTTT\tACTG\tFile3\ts.3".split("\t"), ] headers = ["SampleID", "BarcodeSequence", "LinkerPrimerSequence", "InputFileNames", "Description"] filename_column = "InputFileNames" expected_data = {"File3": "Sample3", "File2": "Sample2", "File1": "Sample1"} actual_data = check_mapping_data(mapping_data, headers, filename_column) self.assertEqual(actual_data, expected_data)
def test_check_mapping_data_valid_data(self): """ Returns expected dict with valid data supplied """ mapping_data = ['Sample1\tAAAA\tACTG\tFile1\ts.1'.split('\t'), 'Sample2\tCCCC\tACTG\tFile2\ts.2'.split('\t'), 'Sample3\tTTTT\tACTG\tFile3\ts.3'.split('\t') ] headers = ['SampleID', 'BarcodeSequence', 'LinkerPrimerSequence', 'InputFileNames', 'Description'] filename_column = 'InputFileNames' expected_data = {'File3': 'Sample3', 'File2': 'Sample2', 'File1': 'Sample1'} actual_data = check_mapping_data(mapping_data, headers, filename_column) self.assertEqual(actual_data, expected_data)