MCPcopy
hub / github.com/django/django / test_uuid4

Method test_uuid4

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

Source from the content-addressed store, hash-verified

12class TestUUID(TestCase):
13 @skipUnlessDBFeature("supports_uuid4_function")
14 def test_uuid4(self):
15 m1 = UUIDModel.objects.create()
16 m2 = UUIDModel.objects.create()
17 UUIDModel.objects.update(uuid=UUID4())
18 m1.refresh_from_db()
19 m2.refresh_from_db()
20 self.assertIsInstance(m1.uuid, uuid.UUID)
21 self.assertEqual(m1.uuid.version, 4)
22 self.assertNotEqual(m1.uuid, m2.uuid)
23
24 @skipUnlessDBFeature("supports_uuid7_function")
25 def test_uuid7(self):

Callers

nothing calls this directly

Calls 4

UUID4Class · 0.90
createMethod · 0.45
updateMethod · 0.45
refresh_from_dbMethod · 0.45

Tested by

no test coverage detected