MCPcopy
hub / github.com/django/django / assertSuccessfulRawQuery

Method assertSuccessfulRawQuery

tests/raw_query/tests.py:72–88  ·  tests/raw_query/tests.py::RawQueryTests.assertSuccessfulRawQuery

Execute the passed query against the passed model and check the output

(
        self,
        model,
        query,
        expected_results,
        expected_annotations=(),
        params=[],
        translations=None,
    )

Source from the content-addressed store, hash-verified

70 cls.r1.reviewed.add(cls.b2, cls.b3, cls.b4)
71
72 def assertSuccessfulRawQuery(
73 self,
74 model,
75 query,
76 expected_results,
77 expected_annotations=(),
78 params=[],
79 translations=None,
80 ):
81 class="st">"""
82 Execute the passed query against the passed model and check the output
83 class="st">"""
84 results = list(
85 model.objects.raw(query, params=params, translations=translations)
86 )
87 self.assertProcessed(model, results, expected_results, expected_annotations)
88 self.assertAnnotations(results, expected_annotations)
89
90 def assertProcessed(self, model, results, orig, expected_annotations=()):
91 class="st">"""

Callers 10

test_simple_raw_queryMethod · 0.95
test_FK_raw_queryMethod · 0.95
test_order_handlerMethod · 0.95
test_translationsMethod · 0.95
test_many_to_manyMethod · 0.95
test_annotationsMethod · 0.95

Calls 3

assertProcessedMethod · 0.95
assertAnnotationsMethod · 0.95
rawMethod · 0.45

Tested by

no test coverage detected