MCPcopy
hub / github.com/django/django / test_uuid7

Method test_uuid7

tests/db_functions/test_uuid.py:25–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

23
24 @skipUnlessDBFeature("supports_uuid7_function")
25 def test_uuid7(self):
26 m1 = UUIDModel.objects.create()
27 m2 = UUIDModel.objects.create()
28 UUIDModel.objects.update(uuid=UUID7())
29 m1.refresh_from_db()
30 m2.refresh_from_db()
31 self.assertIsInstance(m1.uuid, uuid.UUID)
32 self.assertEqual(m1.uuid.version, 7)
33 self.assertNotEqual(m1.uuid, m2.uuid)
34
35 @skipUnlessDBFeature("supports_uuid7_function_shift")
36 def test_uuid7_shift(self):

Callers

nothing calls this directly

Calls 4

UUID7Class · 0.90
createMethod · 0.45
updateMethod · 0.45
refresh_from_dbMethod · 0.45

Tested by

no test coverage detected