aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/mitmproxy/test_flow.py4
-rw-r--r--test/mitmproxy/test_server.py18
-rw-r--r--test/mitmproxy/tservers.py4
3 files changed, 11 insertions, 15 deletions
diff --git a/test/mitmproxy/test_flow.py b/test/mitmproxy/test_flow.py
index 3b5d0ac1..371474ff 100644
--- a/test/mitmproxy/test_flow.py
+++ b/test/mitmproxy/test_flow.py
@@ -308,11 +308,11 @@ class TestFlowMaster:
fm.clientconnect(f.client_conn)
f.request = http.HTTPRequest.wrap(mitmproxy.test.tutils.treq())
fm.request(f)
- assert s.flow_count() == 1
+ assert len(s.flows) == 1
f.response = http.HTTPResponse.wrap(mitmproxy.test.tutils.tresp())
fm.response(f)
- assert s.flow_count() == 1
+ assert len(s.flows) == 1
fm.clientdisconnect(f.client_conn)
diff --git a/test/mitmproxy/test_server.py b/test/mitmproxy/test_server.py
index 6e7ca275..6302a52d 100644
--- a/test/mitmproxy/test_server.py
+++ b/test/mitmproxy/test_server.py
@@ -984,16 +984,16 @@ class TestUpstreamProxySSL(
assert req.status_code == 418
# CONNECT from pathoc to chain[0],
- assert self.proxy.tmaster.state.flow_count() == 1
+ assert len(self.proxy.tmaster.state.flows) == 1
assert self.proxy.tmaster.state.flows[0].server_conn.via
# request from pathoc to chain[0]
# CONNECT from proxy to chain[1],
- assert self.chain[0].tmaster.state.flow_count() == 1
+ assert len(self.chain[0].tmaster.state.flows) == 1
assert self.chain[0].tmaster.state.flows[0].server_conn.via
# request from proxy to chain[1]
# request from chain[0] (regular proxy doesn't store CONNECTs)
assert not self.chain[1].tmaster.state.flows[0].server_conn.via
- assert self.chain[1].tmaster.state.flow_count() == 1
+ assert len(self.chain[1].tmaster.state.flows) == 1
class RequestKiller:
@@ -1027,17 +1027,17 @@ class TestProxyChainingSSLReconnect(tservers.HTTPUpstreamProxyTest):
assert req.status_code == 418
# First request goes through all three proxies exactly once
- assert self.proxy.tmaster.state.flow_count() == 1
- assert self.chain[0].tmaster.state.flow_count() == 1
- assert self.chain[1].tmaster.state.flow_count() == 1
+ assert len(self.proxy.tmaster.state.flows) == 1
+ assert len(self.chain[0].tmaster.state.flows) == 1
+ assert len(self.chain[1].tmaster.state.flows) == 1
req = p.request("get:'/p/418:b\"content2\"'")
assert req.status_code == 502
- assert self.proxy.tmaster.state.flow_count() == 2
- assert self.chain[0].tmaster.state.flow_count() == 2
+ assert len(self.proxy.tmaster.state.flows) == 2
+ assert len(self.chain[0].tmaster.state.flows) == 2
# Upstream sees two requests due to reconnection attempt
- assert self.chain[1].tmaster.state.flow_count() == 3
+ assert len(self.chain[1].tmaster.state.flows) == 3
assert not self.chain[1].tmaster.state.flows[-1].response
assert not self.chain[1].tmaster.state.flows[-2].response
diff --git a/test/mitmproxy/tservers.py b/test/mitmproxy/tservers.py
index 170a4917..c9a7e595 100644
--- a/test/mitmproxy/tservers.py
+++ b/test/mitmproxy/tservers.py
@@ -35,10 +35,6 @@ class TestState:
# if f not in self.flows:
# self.flows.append(f)
- # FIXME: compat with old state - remove in favor of len(state.flows)
- def flow_count(self):
- return len(self.flows)
-
class TestMaster(master.Master):
gic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/dts-v1/;

/include/ "AWM002-8M.dtsi"

/ {
	compatible = "AWM003", "ralink,rt5350-soc";
	model = "AsiaRF AWM003 EVB";

	memory@0 {
		device_type = "memory";
		reg = <0x0 0x4000000>;
	};

	palmbus@10000000 {
		spi@b00 {
			m25p80@0 {
				compatible = "mx25l6405d";
				linux,modalias = "m25p80", "mx25l6405d";
			};
		};
	};

	ethernet@10100000 {
		mtd-mac-address = <&factory 0x28>;
	};

	wmac@10180000 {
		ralink,mtd-eeprom = <&factory 0>;
	};

	gpio-leds {
		compatible = "gpio-leds";
		tx {
			label = "awm002-evb:green:tx";
			gpios = <&gpio0 15 1>;
		};
		rx {
			label = "awm002-evb:green:rx";
			gpios = <&gpio0 16 1>;
		};
		wps {
			label = "awm002-evb:green:wps";
			gpios = <&gpio0 21 1>;
		};
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		#address-cells = <1>;
		#size-cells = <0>;
		poll-interval = <20>;
		reset_wps {
			label = "reset_wps";
			gpios = <&gpio0 0 1>;
			linux,code = <0x198>;
		};
		mode {
			label = "mode";
			gpios = <&gpio0 20 1>;
			linux,code = <0x32>;
		};
	};
};