MCPcopy
hub / github.com/django/django / test_bulk_insert_now

Method test_bulk_insert_now

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

Source from the content-addressed store, hash-verified

313
314 @skipUnlessDBFeature("has_bulk_insert")
315 def test_bulk_insert_now(self):
316 NullableFields.objects.bulk_create(
317 [
318 NullableFields(datetime_field=Now()),
319 NullableFields(datetime_field=Now()),
320 ]
321 )
322 self.assertEqual(
323 NullableFields.objects.filter(datetime_field__isnull=False).count(),
324 2,
325 )
326
327 @skipUnlessDBFeature("has_bulk_insert")
328 def test_bulk_insert_nullable_fields(self):

Callers

nothing calls this directly

Calls 5

NowClass · 0.90
NullableFieldsClass · 0.85
bulk_createMethod · 0.80
countMethod · 0.45
filterMethod · 0.45

Tested by

no test coverage detected