MCPcopy
hub / github.com/django/django / assertOutput

Method assertOutput

tests/admin_scripts/tests.py:189–201  ·  view source on GitHub ↗

Utility assertion: assert that the given message exists in the output

(self, stream, msg, regex=False)

Source from the content-addressed store, hash-verified

187 )
188
189 def assertOutput(self, stream, msg, regex=False):
190 "Utility assertion: assert that the given message exists in the output"
191 if regex:
192 self.assertIsNotNone(
193 re.search(msg, stream),
194 "'%s' does not match actual output text '%s'" % (msg, stream),
195 )
196 else:
197 self.assertIn(
198 msg,
199 stream,
200 "'%s' does not match actual output text '%s'" % (msg, stream),
201 )
202
203 def assertNotInOutput(self, stream, msg):
204 """

Calls 1

searchMethod · 0.80

Tested by

no test coverage detected