def get_name(self): '''Returns name''' name = parsers.get_name(self.__chebi_id) if name is None: name = parsers.get_name(self.get_parent_id()) if name is None: for parent_or_child_id in self.__get_all_ids(): name = parsers.get_name(parent_or_child_id) if name is not None: break return name
def test_get_name_null(self): '''COMMENT''' self.assertIsNone(parsers.get_name(7483))
def test_get_name_neg(self): '''COMMENT''' self.assertIsNone(parsers.get_name(-1))
def test_get_name(self): '''COMMENT''' name = '3,7-DIHYDROXY-2-NAPHTHOIC ACID' self.assertEquals(name, parsers.get_name(41106))
def test_get_name_null(self): '''COMMENT''' self.assertIsNone(parsers.get_name(7483))
def test_get_name_neg(self): '''COMMENT''' self.assertIsNone(parsers.get_name(-1))
def test_get_name(self): '''COMMENT''' name = '3,7-DIHYDROXY-2-NAPHTHOIC ACID' self.assertEquals(name, parsers.get_name(41106))