Ejemplo n.º 1
0
 def test_valid_10_char_rfid_passes_test(self):
     # Validation failure raises exception, we test this by expecting it not to raise an exception.
     validate_rfid("1234567890")
Ejemplo n.º 2
0
 def test_invalid_rfid_fails_test(self):
     self.assertRaises(ValidationError, lambda: validate_rfid("1234567"))
     self.assertRaises(ValidationError, lambda: validate_rfid("abcdefgh"))
     self.assertRaises(ValidationError, lambda: validate_rfid("abcdefghij"))
     self.assertRaises(ValidationError, lambda: validate_rfid("        "))
     self.assertRaises(ValidationError, lambda: validate_rfid("          "))
Ejemplo n.º 3
0
 def test_invalid_rfid_fails_test(self):
     self.assertRaises(ValidationError, lambda: validate_rfid('1234567'))
     self.assertRaises(ValidationError, lambda: validate_rfid('abcdefgh'))
     self.assertRaises(ValidationError, lambda: validate_rfid('abcdefghij'))
     self.assertRaises(ValidationError, lambda: validate_rfid('        '))
     self.assertRaises(ValidationError, lambda: validate_rfid('          '))