def test_create_genome_statements_3(self): """Verify list of INSERT statements is created correctly for: 'add' ticket, two CDS features, two tRNA features, and two tmRNA features.""" self.genome1.cds_features = self.cds_features self.genome1.trna_features = self.trna_features self.genome1.tmrna_features = self.tmrna_features statements = mysqldb.create_genome_statements( self.genome1, tkt_type="add") self.assertEqual(len(statements), 7)
def test_create_genome_statements_3(self): """Verify list of INSERT statements is created correctly for: 'add' ticket, and two CDS features.""" cds1 = cds.Cds() cds1.genome_id = "L5" cds1.start = 10 cds1.stop = 100 cds1.parts = 1 cds1.length = 1000 cds1.name = "1" cds1.type = "CDS" cds1.translation = "AGGPT" cds1.orientation = "F" cds1.description = "description" cds1.locus_tag = "SEA_L5_001" cds2 = cds.Cds() cds2.genome_id = "L5" cds2.start = 100 cds2.stop = 1000 cds2.parts = 1 cds2.length = 10000 cds2.name = "2" cds2.type = "CDS" cds2.translation = "AKKQE" cds2.orientation = "R" cds2.description = "description" cds2.locus_tag = "SEA_L5_002" self.genome1.id = "L5" self.genome1.name = "L5_Draft" self.genome1.host_genus = "Mycobacterium" self.genome1.annotation_status = "final" self.genome1.accession = "ABC123" self.genome1.seq = "ATCG" self.genome1.length = 4 self.genome1.gc = 0.5001 self.genome1.date = '1/1/2000' self.genome1.retrieve_record = "1" self.genome1.annotation_author = "1" self.genome1.cluster = "A" self.genome1.subcluster = "A2" self.genome1.cds_features = [cds1, cds2] statements = mysqldb.create_genome_statements(self.genome1, tkt_type="add") self.assertEqual(len(statements), 3)
def test_create_genome_statements_2(self): """Verify list of INSERT statements is created correctly for: 'replace' ticket, and no CDS features.""" self.genome1.id = "L5" self.genome1.name = "L5_Draft" self.genome1.host_genus = "Mycobacterium" self.genome1.annotation_status = "final" self.genome1.accession = "ABC123" self.genome1.seq = "ATCG" self.genome1.length = 4 self.genome1.gc = 0.5001 self.genome1.date = '1/1/2000' self.genome1.retrieve_record = "1" self.genome1.annotation_author = "1" self.genome1.cluster = "A" self.genome1.subcluster = "A2" statements = mysqldb.create_genome_statements(self.genome1, tkt_type="replace") self.assertEqual(len(statements), 2)
def test_create_genome_statements_2(self): """Verify list of INSERT statements is created correctly for: 'replace' ticket, and no CDS features.""" statements = mysqldb.create_genome_statements( self.genome1, tkt_type="replace") self.assertEqual(len(statements), 2)