MCPcopy
hub / github.com/django/django / test_missing_fields_without_PK

Method test_missing_fields_without_PK

tests/raw_query/tests.py:308–312  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

306 self.assertIsNotNone(author.last_name)
307
308 def test_missing_fields_without_PK(self):
309 query = "SELECT first_name, dob FROM raw_query_author"
310 msg = "Raw query must include the primary key"
311 with self.assertRaisesMessage(FieldDoesNotExist, msg):
312 list(Author.objects.raw(query))
313
314 def test_missing_fields_fetch_mode_peers(self):
315 query = "SELECT id, first_name, dob FROM raw_query_author"

Callers

nothing calls this directly

Calls 2

assertRaisesMessageMethod · 0.80
rawMethod · 0.45

Tested by

no test coverage detected