MCPcopy
hub / github.com/django/django / test_datetimes_invalid_field

Method test_datetimes_invalid_field

tests/queries/tests.py:1495–1500  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1493 self.assertSequenceEqual(Valid.objects.all(), [])
1494
1495 def test_datetimes_invalid_field(self):
1496 # An error should be raised when QuerySet.datetimes() is passed the
1497 # wrong type of field.
1498 msg = "'name' isn't a DateField, TimeField, or DateTimeField."
1499 with self.assertRaisesMessage(TypeError, msg):
1500 Item.objects.datetimes("name", "month")
1501
1502 def test_ticket22023(self):
1503 with self.assertRaisesMessage(

Callers

nothing calls this directly

Calls 2

assertRaisesMessageMethod · 0.80
datetimesMethod · 0.80

Tested by

no test coverage detected