class Organization(models.Model): name = models.CharField(max_length=50) active = models.BooleanField(default=False) date = models.DateTimeField(null=True) uuid = models.Uuid4Field(uuid_type="v1", db_index=True)
async def test_uuidv4field(self): with self.assertRaises(FieldError) as exc: models.Uuid4Field(uuid_type='mn') self.assertEqual(exc.exception.args[0], '{} is not a recognized type'.format('mn'))
class Appointment(models.Model): name = models.CharField(max_length=50) date = models.DateField() time = models.TimeField(null=True) uuid = models.Uuid4Field()
async def test_uuidv4field(self): with self.assertRaises(AsyncOrmFieldError) as exc: models.Uuid4Field(uuid_type="mn") self.assertEqual(exc.exception.args[0], "{} is not a recognized type".format("mn"))