def test_isatab2cedar_convert_mtbls3(self): test_case = 'MTBLS3' isa2cedar = ISATab2CEDAR("http://www.isa-tools.org/") isa2cedar.createCEDARjson(os.path.join(self._tab_data_dir, test_case), self._tmp_dir, True) expected_json = json.load(open(os.path.join(self._json_data_dir, 'cedar', test_case + '.json'))) actual_json = json.load(open(os.path.join(self._tmp_dir, test_case + '.json'))) utils.strip_ids(expected_json) utils.strip_ids(actual_json) self.assertTrue(utils.assert_json_equal(expected_json, actual_json))
def test_isatab2cedar_convert_mtbls1(self): test_case = 'MTBLS1' isa2cedar = ISATab2CEDAR("http://www.isa-tools.org/") isa2cedar.createCEDARjson(os.path.join(self._tab_data_dir, test_case), self._tmp_dir, True) with open(os.path.join(self._json_data_dir, 'cedar', test_case + '.json')) as expected_file, \ open(os.path.join(self._tmp_dir, '1425901783014' + '.json')) as actual_file: expected_json = json.load(expected_file) actual_json = json.load(actual_file) utils.strip_ids(expected_json) utils.strip_ids(actual_json) self.assertTrue(utils.assert_json_equal(expected_json, actual_json))
def test_isatab2cedar_convert_charac_param_factor(self): test_case = 'TEST-ISA-charac-param-factor' isa2cedar = ISATab2CEDAR("http://www.isa-tools.org/") isa2cedar.createCEDARjson(os.path.join(self._tab_data_dir, test_case), self._tmp_dir, True) with open(os.path.join(self._json_data_dir, 'cedar', test_case + '.json')) as expected_file, \ open(os.path.join(self._tmp_dir, test_case + '.json')) as actual_file: expected_json = json.load(expected_file) actual_json = json.load(actual_file) utils.strip_ids(expected_json) utils.strip_ids(actual_json) self.assertTrue(utils.assert_json_equal(expected_json, actual_json))