MCPcopy
hub / github.com/locustio/locust / test_error_message

Method test_error_message

locust/test/test_http.py:116–126  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

114 )
115
116 def test_error_message(self):
117 s = self.get_client()
118 kwargs = {}
119
120 def on_request(**kw):
121 kwargs.update(kw)
122
123 self.environment.events.request.add_listener(on_request)
124 s.request("get", "/wrong_url", context={"foo": "bar"})
125 self.assertIn("/wrong_url", str(kwargs["exception"]))
126 self.assertDictEqual({"foo": "bar"}, kwargs["context"])
127
128 def test_context_in_success(self):
129 s = self.get_client()

Callers

nothing calls this directly

Calls 3

get_clientMethod · 0.95
add_listenerMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected