MCPcopy
hub / github.com/django/django / test_right_hand_addition

Method test_right_hand_addition

tests/expressions/tests.py:1839–1849  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1837 Number.objects.update(integer=F("integer").bitxor(48))
1838
1839 def test_right_hand_addition(self):
1840 # Right hand operators
1841 Number.objects.filter(pk=self.n.pk).update(
1842 integer=15 + F("integer"), float=42.7 + F("float")
1843 )
1844
1845 # RH Addition of floats and integers
1846 self.assertEqual(Number.objects.get(pk=self.n.pk).integer, 57)
1847 self.assertEqual(
1848 Number.objects.get(pk=self.n.pk).float, Approximate(58.200, places=3)
1849 )
1850
1851 def test_right_hand_subtraction(self):
1852 Number.objects.filter(pk=self.n.pk).update(

Callers

nothing calls this directly

Calls 5

FClass · 0.90
ApproximateClass · 0.90
updateMethod · 0.45
filterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected