def testTaxonomyNode(self): for i in range(28): a1 = TaxonomyNode(3, 4, Rank.string_representation(i)) a2 = TaxonomyNode(4, 3, i) self.assertEquals(a1.tax_id, 3) self.assertEquals(a1.parent_tax_id, 4) self.assertEquals(a2.tax_id, 4) self.assertEquals(a2.parent_tax_id, 3) self.assertEquals(a1.rank, a2.rank)
def testRank(self): for i in range(28): before = Rank.string_representation(i) after = Rank.parse_enum_string(before) self.assertEquals(i, after)