@@ -92,66 +92,66 @@ def test_proxy_none_noenv(monkeypatch):
9292
9393
9494def test_proxy_none_httpenv_select (monkeypatch ):
95- os . environ [ "HTTP_PROXY" ] = "http://localhost/123"
95+ monkeypatch . setenv ( "HTTP_PROXY" , "http://localhost/123" )
9696 client = Client ("http://foo@sentry.io/123" )
9797 assert client .transport ._pool .proxy .scheme == "http"
9898
9999
100100def test_proxy_none_httpsenv_select (monkeypatch ):
101- os . environ [ "HTTPS_PROXY" ] = "https://localhost/123"
101+ monkeypatch . setenv ( "HTTPS_PROXY" , "https://localhost/123" )
102102 client = Client ("https://foo@sentry.io/123" )
103103 assert client .transport ._pool .proxy .scheme == "https"
104104
105105
106106def test_proxy_none_httpenv_fallback (monkeypatch ):
107- os . environ [ "HTTP_PROXY" ] = "http://localhost/123"
107+ monkeypatch . setenv ( "HTTP_PROXY" , "http://localhost/123" )
108108 client = Client ("https://foo@sentry.io/123" )
109109 assert client .transport ._pool .proxy .scheme == "http"
110110
111111
112112def test_proxy_bothselect_bothen (monkeypatch ):
113- os . environ [ "HTTP_PROXY" ] = "http://localhost/123"
114- os . environ [ "HTTPS_PROXY" ] = "https://localhost/123"
113+ monkeypatch . setenv ( "HTTP_PROXY" , "http://localhost/123" )
114+ monkeypatch . setenv ( "HTTPS_PROXY" , "https://localhost/123" )
115115 client = Client ("https://foo@sentry.io/123" , http_proxy = "" , https_proxy = "" )
116116 assert client .transport ._pool .proxy is None
117117
118118
119119def test_proxy_bothavoid_bothenv (monkeypatch ):
120- os . environ [ "HTTP_PROXY" ] = "http://localhost/123"
121- os . environ [ "HTTPS_PROXY" ] = "https://localhost/123"
120+ monkeypatch . setenv ( "HTTP_PROXY" , "http://localhost/123" )
121+ monkeypatch . setenv ( "HTTPS_PROXY" , "https://localhost/123" )
122122 client = Client ("https://foo@sentry.io/123" , http_proxy = None , https_proxy = None )
123123 assert client .transport ._pool .proxy .scheme == "https"
124124
125125
126126def test_proxy_bothselect_httpenv (monkeypatch ):
127- os . environ [ "HTTP_PROXY" ] = "http://localhost/123"
127+ monkeypatch . setenv ( "HTTP_PROXY" , "http://localhost/123" )
128128 client = Client ("https://foo@sentry.io/123" , http_proxy = None , https_proxy = None )
129129 assert client .transport ._pool .proxy .scheme == "http"
130130
131131
132132def test_proxy_httpselect_bothenv (monkeypatch ):
133- os . environ [ "HTTP_PROXY" ] = "http://localhost/123"
134- os . environ [ "HTTPS_PROXY" ] = "https://localhost/123"
133+ monkeypatch . setenv ( "HTTP_PROXY" , "http://localhost/123" )
134+ monkeypatch . setenv ( "HTTPS_PROXY" , "https://localhost/123" )
135135 client = Client ("https://foo@sentry.io/123" , http_proxy = None , https_proxy = "" )
136136 assert client .transport ._pool .proxy .scheme == "http"
137137
138138
139139def test_proxy_httpsselect_bothenv (monkeypatch ):
140- os . environ [ "HTTP_PROXY" ] = "http://localhost/123"
141- os . environ [ "HTTPS_PROXY" ] = "https://localhost/123"
140+ monkeypatch . setenv ( "HTTP_PROXY" , "http://localhost/123" )
141+ monkeypatch . setenv ( "HTTPS_PROXY" , "https://localhost/123" )
142142 client = Client ("https://foo@sentry.io/123" , http_proxy = "" , https_proxy = None )
143143 assert client .transport ._pool .proxy .scheme == "https"
144144
145145
146146def test_proxy_httpselect_httpsenv (monkeypatch ):
147- os . environ [ "HTTPS_PROXY" ] = "https://localhost/123"
147+ monkeypatch . setenv ( "HTTPS_PROXY" , "https://localhost/123" )
148148 client = Client ("https://foo@sentry.io/123" , http_proxy = None , https_proxy = "" )
149149 assert client .transport ._pool .proxy is None
150150
151151
152152def test_proxy_httpsselect_bothenv_http (monkeypatch ):
153- os . environ [ "HTTP_PROXY" ] = "http://localhost/123"
154- os . environ [ "HTTPS_PROXY" ] = "https://localhost/123"
153+ monkeypatch . setenv ( "HTTP_PROXY" , "http://localhost/123" )
154+ monkeypatch . setenv ( "HTTPS_PROXY" , "https://localhost/123" )
155155 client = Client ("http://foo@sentry.io/123" , http_proxy = None , https_proxy = None )
156156 assert client .transport ._pool .proxy .scheme == "http"
157157
0 commit comments