@@ -30,10 +30,7 @@ def test_get_twice():
3030 ]
3131 )
3232 sock .send .assert_has_calls (
33- [
34- mock .call (b"Host: " ),
35- mock .call (b"wifitest.adafruit.com" ),
36- ]
33+ [mock .call (b"Host: " ), mock .call (b"wifitest.adafruit.com" ),]
3734 )
3835 assert r .text == str (text , "utf-8" )
3936
@@ -48,10 +45,7 @@ def test_get_twice():
4845 ]
4946 )
5047 sock .send .assert_has_calls (
51- [
52- mock .call (b"Host: " ),
53- mock .call (b"wifitest.adafruit.com" ),
54- ]
48+ [mock .call (b"Host: " ), mock .call (b"wifitest.adafruit.com" ),]
5549 )
5650
5751 assert r .text == str (text , "utf-8" )
@@ -78,10 +72,7 @@ def test_get_twice_after_second():
7872 ]
7973 )
8074 sock .send .assert_has_calls (
81- [
82- mock .call (b"Host: " ),
83- mock .call (b"wifitest.adafruit.com" ),
84- ]
75+ [mock .call (b"Host: " ), mock .call (b"wifitest.adafruit.com" ),]
8576 )
8677
8778 r2 = s .get ("https://" + host + path + "2" )
@@ -95,10 +86,7 @@ def test_get_twice_after_second():
9586 ]
9687 )
9788 sock .send .assert_has_calls (
98- [
99- mock .call (b"Host: " ),
100- mock .call (b"wifitest.adafruit.com" ),
101- ]
89+ [mock .call (b"Host: " ), mock .call (b"wifitest.adafruit.com" ),]
10290 )
10391 sock .connect .assert_called_once_with ((host , 443 ))
10492 pool .socket .assert_called_once ()
@@ -129,10 +117,7 @@ def test_connect_out_of_memory():
129117 ]
130118 )
131119 sock .send .assert_has_calls (
132- [
133- mock .call (b"Host: " ),
134- mock .call (b"wifitest.adafruit.com" ),
135- ]
120+ [mock .call (b"Host: " ), mock .call (b"wifitest.adafruit.com" ),]
136121 )
137122 assert r .text == str (text , "utf-8" )
138123
@@ -146,10 +131,7 @@ def test_connect_out_of_memory():
146131 ]
147132 )
148133 sock3 .send .assert_has_calls (
149- [
150- mock .call (b"Host: " ),
151- mock .call (b"wifitest2.adafruit.com" ),
152- ]
134+ [mock .call (b"Host: " ), mock .call (b"wifitest2.adafruit.com" ),]
153135 )
154136
155137 assert r .text == str (text , "utf-8" )
@@ -169,17 +151,11 @@ def test_second_send_fails():
169151 r = s .get ("https://" + host + path )
170152
171153 sock .send .assert_has_calls (
172- [
173- mock .call (b"testwifi/index.html" ),
174- ]
154+ [mock .call (b"testwifi/index.html" ),]
175155 )
176156
177157 sock .send .assert_has_calls (
178- [
179- mock .call (b"Host: " ),
180- mock .call (b"wifitest.adafruit.com" ),
181- mock .call (b"\r \n " ),
182- ]
158+ [mock .call (b"Host: " ), mock .call (b"wifitest.adafruit.com" ), mock .call (b"\r \n " ),]
183159 )
184160 assert r .text == str (text , "utf-8" )
185161
0 commit comments