MCPcopy
hub / github.com/django/django / test_uuid7_unsupported

Method test_uuid7_unsupported

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

Source from the content-addressed store, hash-verified

73
74 @skipIfDBFeature("supports_uuid7_function")
75 def test_uuid7_unsupported(self):
76 if connection.vendor == "mysql":
77 if connection.mysql_is_mariadb:
78 msg = "UUID7 requires MariaDB version 11.7 or later."
79 else:
80 msg = "UUID7 is not supported on MySQL."
81 elif connection.vendor == "postgresql":
82 msg = "UUID7 requires PostgreSQL version 18 or later."
83 elif connection.vendor == "sqlite":
84 msg = "UUID7 on SQLite requires Python version 3.14 or later."
85 else:
86 msg = "UUID7 is not supported on this database backend."
87
88 with self.assertRaisesMessage(NotSupportedError, msg):
89 UUIDModel.objects.update(uuid=UUID7())
90
91 @skipUnlessDBFeature("supports_uuid7_function")
92 @skipIfDBFeature("supports_uuid7_function_shift")

Callers

nothing calls this directly

Calls 3

UUID7Class · 0.90
assertRaisesMessageMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected