File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1212import requests
1313
1414from mocket import Mocket , Mocketizer , mocketize
15- from mocket .mockhttp import Entry , Response
15+ from mocket .mocks . mockhttp import Entry , Response
1616
1717
1818class HttpTestCase (TestCase ):
@@ -448,3 +448,10 @@ def test_add_trailing_slash(self):
448448 url = "http://testme.org"
449449 entry = Entry (url , "GET" , [Response (body = '{"foo":"bar0"}' , status = 200 )])
450450 self .assertEqual (entry .path , "/" )
451+
452+ @mocketize
453+ def test_mocket_with_no_path (self ):
454+ Entry .register (Entry .GET , "http://httpbin.local" , Response (status = 202 ))
455+ response = urlopen ("http://httpbin.local/" )
456+ self .assertEqual (response .code , 202 )
457+ self .assertEqual (Mocket ._entries [("httpbin.local" , 80 )][0 ].path , "/" )
You can’t perform that action at this time.
0 commit comments