def test_combination_has_valid_char(self):
     code = Code()
     allowed_chars = code.allowed_chars
     override_code = SimpleOverride(request_code='624FZ').override_code
     self.assertIsNotNone(override_code)
     for c in override_code:
         self.assertIn(c, allowed_chars)
     for c in code.decode(override_code):
         self.assertIn(c, allowed_chars)
 def test_code_validated(self):
     code = Code()
     plain_code = str(code)
     validation_code = code.validation_code
     code = Code(plain_code)
     self.assertTrue(code.validate(validation_code))
 def test_code_not_validated(self):
     code = Code('AAAAA')
     self.assertFalse(code.validate(None))