MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / Dummy

Class Dummy

test/mitmproxy/addons/test_keepserving.py:8–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8class Dummy:
9 def __init__(self, val: bool):
10 self.val = val
11
12 def load(self, loader):
13 loader.add_option("client_replay", bool, self.val, "test")
14 loader.add_option("server_replay", bool, self.val, "test")
15 loader.add_option("rfile", bool, self.val, "test")
16
17 @command.command("readfile.reading")
18 def readfile(self) -> bool:
19 return self.val
20
21 @command.command("replay.client.count")
22 def creplay(self) -> int:
23 return 1 if self.val else 0
24
25 @command.command("replay.server.count")
26 def sreplay(self) -> int:
27 return 1 if self.val else 0
28
29 @command.command("proxyserver.active_connections")
30 def active_connections(self) -> int:
31 return 1 if self.val else 0
32
33
34class TKS(keepserving.KeepServing):

Callers 1

test_keepservingFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_keepservingFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…