MCPcopy
hub / github.com/django/django / test_update

Method test_update

tests/db_functions/comparison/test_least.py:82–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

80 self.assertEqual(authors.first().lowest_age, 45)
81
82 def test_update(self):
83 author = Author.objects.create(name="James Smith", goes_by="Jim")
84 Author.objects.update(alias=Least("name", "goes_by"))
85 author.refresh_from_db()
86 self.assertEqual(author.alias, "James Smith")
87
88 def test_decimal_filter(self):
89 obj = DecimalModel.objects.create(n1=Decimal("1.1"), n2=Decimal("1.2"))

Callers

nothing calls this directly

Calls 4

LeastClass · 0.90
createMethod · 0.45
updateMethod · 0.45
refresh_from_dbMethod · 0.45

Tested by

no test coverage detected