MCPcopy
hub / github.com/django/django / test_db_expression_primary_key

Method test_db_expression_primary_key

tests/bulk_create/tests.py:890–894  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

888 "can_return_rows_from_bulk_insert", "supports_expression_defaults"
889 )
890 def test_db_expression_primary_key(self):
891 (obj,) = DbDefaultPrimaryKey.objects.bulk_create(
892 [DbDefaultPrimaryKey(id=Now())]
893 )
894 self.assertIsInstance(obj.id, datetime)
895
896
897@skipUnlessDBFeature("supports_transactions", "has_bulk_insert")

Callers

nothing calls this directly

Calls 3

NowClass · 0.90
DbDefaultPrimaryKeyClass · 0.85
bulk_createMethod · 0.80

Tested by

no test coverage detected