MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_create

Function test_create

test/mitmproxy/addons/test_view.py:232–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

230
231
232def test_create():
233 v = view.View()
234 with taddons.context():
235 v.create("get", "http://foo.com")
236 assert len(v) == 1
237 assert v[0].request.url == "http://foo.com/"
238 v.create("get", "http://foo.com")
239 assert len(v) == 2
240 with pytest.raises(exceptions.CommandError, match="Invalid URL"):
241 v.create("get", "http://foo.com\\")
242 with pytest.raises(exceptions.CommandError, match="Invalid URL"):
243 v.create("get", "http://")
244
245
246def test_orders():

Callers

nothing calls this directly

Calls 2

createMethod · 0.95
contextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…