def test_validate_sirna_incorrect_length(self): incorrect_seq = 'ACGT' with self.assertRaises(errors.ValidationError) as error: validators.validate_sirna(incorrect_seq) self.assertEqual(error.exception.message, errors.LENGTH_ERROR)
def test_validate_sirna_incorrect_pattern(self): incorrect_seq = 'ptaki lataja kluczem' with self.assertRaises(errors.ValidationError) as error: validators.validate_sirna(incorrect_seq) self.assertEqual(error.exception.message, errors.PATTERN_ERROR)
def test_validate_sirna(self): seq = 'ACGTACGTACGTACGTACGT' self.assertIsNone(validators.validate_sirna(seq))