def test_parse_feature_data_3(self): """Verify that Cds objects are constructed correctly for multiple valid PhageID when the phage_id parameter is not specified.""" cds_list = mysqldb.parse_feature_data(self.engine, "cds", query=GENE_QUERY) with self.subTest(): self.assertEqual(len(cds_list), 4)
def test_parse_feature_data_2(self): """Verify that an empty Cds object list is constructed for an invalid PhageID.""" cds_list = mysqldb.parse_feature_data(self.engine, "cds", column="PhageID", phage_id_list=["L5"], query=GENE_QUERY) self.assertEqual(len(cds_list), 0)
def test_parse_feature_data_6(self): """Verify that a dictionary is returned for an invalid feature type.""" ftr_list = mysqldb.parse_feature_data(self.engine, "invalid", column="PhageID", phage_id_list=["Trixie"], query=TMRNA_QUERY) with self.subTest(): self.assertEqual(len(ftr_list), 1) with self.subTest(): self.assertIsInstance(ftr_list[0], dict)
def test_parse_feature_data_5(self): """Verify that a Tmrna object is constructed correctly for a valid PhageID.""" ftr_list = mysqldb.parse_feature_data(self.engine, "tmrna", column="PhageID", phage_id_list=["Trixie"], query=TMRNA_QUERY) with self.subTest(): self.assertEqual(len(ftr_list), 1) with self.subTest(): self.assertEqual(ftr_list[0].id, "Trixie_6") with self.subTest(): self.assertEqual(ftr_list[0].genome_id, "Trixie")
def test_parse_feature_data_1(self): """Verify that a Cds object is constructed correctly for a valid PhageID.""" cds_list = mysqldb.parse_feature_data(self.engine, "cds", column="PhageID", phage_id_list=["Trixie"], query=GENE_QUERY) with self.subTest(): self.assertEqual(len(cds_list), 3) with self.subTest(): self.assertEqual(cds_list[0].id, "Trixie_1") with self.subTest(): self.assertEqual(cds_list[0].genome_id, "Trixie")