Skip to content

Commit

Permalink
Fixed errors in test_urllib3.py
Browse files Browse the repository at this point in the history
  • Loading branch information
comrumino committed Jan 27, 2024
1 parent 1b071da commit 63ee434
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions tests/test_urllib3.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import rpyc
import inspect
from rpyc.utils.server import ThreadedServer
from rpyc import SlaveService
import unittest
try:
import urllib3
urllib3.request
_urllib3_import_failed = False
except Except:
except Exception:
_urllib3_import_failed = True


Expand All @@ -28,14 +28,13 @@ def tearDown(self):
def test_issue(self):
self.conn.execute('import urllib3')
urllib3_ = self.conn.modules.urllib3
headers = urllib3.HTTPHeaderDict()
headers.add("Accept", "application/json")
headers.add("Accept", "text/plain")
resp = urllib3_.request( "POST", "https://httpbin.org/post", fields={"hello": "world"}, headers={ "X-Request-Id": "test"})
# headers = urllib3.HTTPHeaderDict()
# headers.add("Accept", "application/json")
# headers.add("Accept", "text/plain")
headers = {"X-Request-Id": "test"}
resp = urllib3_.request("POST", "https://httpbin.org/post", fields={"hello": "world"}, headers=headers)
__import__('code').interact(local=locals() | globals())


#self.assertTrue(self.conn.root.instance(remote_list, list))
# self.assertTrue(self.conn.root.instance(remote_list, list))


if __name__ == "__main__":
Expand Down

0 comments on commit 63ee434

Please sign in to comment.