MCPcopy
hub / github.com/django/django / test_AutoField

Method test_AutoField

tests/model_fields/test_promises.py:34–38  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32
33class PromiseTest(SimpleTestCase):
34 def test_AutoField(self):
35 lazy_func = lazy(lambda: 1, int)
36 self.assertIsInstance(
37 AutoField(primary_key=True).get_prep_value(lazy_func()), int
38 )
39
40 def test_BinaryField(self):
41 lazy_func = lazy(lambda: b"", bytes)

Callers

nothing calls this directly

Calls 3

lazyFunction · 0.90
AutoFieldClass · 0.90
get_prep_valueMethod · 0.45

Tested by

no test coverage detected