MCPcopy
hub / github.com/django/django / _assert_raises_or_warns_cm

Method _assert_raises_or_warns_cm

django/test/testcases.py:843–848  ·  view source on GitHub ↗
(
        self, func, cm_attr, expected_exception, expected_message
    )

Source from the content-addressed store, hash-verified

841
842 @contextmanager
843 def _assert_raises_or_warns_cm(
844 self, func, cm_attr, expected_exception, expected_message
845 ):
846 with func(expected_exception) as cm:
847 yield cm
848 self.assertIn(expected_message, str(getattr(cm, cm_attr)))
849
850 def _assertFooMessage(
851 self, func, cm_attr, expected_exception, expected_message, *args, **kwargs

Callers 1

_assertFooMessageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected