mirror of
				https://github.com/django/daphne.git
				synced 2025-10-31 15:57:25 +03:00 
			
		
		
		
	Fix test path encoding
This commit is contained in:
		
							parent
							
								
									aff9ca2f13
								
							
						
					
					
						commit
						be172045ed
					
				|  | @ -46,7 +46,7 @@ class HandlerTests(SimpleTestCase): | |||
|             "reply_channel": "test", | ||||
|             "http_version": "1.1", | ||||
|             "method": "GET", | ||||
|             "path": "/test/", | ||||
|             "path": b"/test/", | ||||
|         }, "test") | ||||
|         response = HttpResponse(b"Hi there!", content_type="text/plain") | ||||
|         # Run the handler | ||||
|  | @ -74,7 +74,7 @@ class HandlerTests(SimpleTestCase): | |||
|             "reply_channel": "test", | ||||
|             "http_version": "1.1", | ||||
|             "method": "GET", | ||||
|             "path": "/test/", | ||||
|             "path": b"/test/", | ||||
|         }, "test") | ||||
|         response = HttpResponse(b"Thefirstthirtybytesisrighthereandhereistherest") | ||||
|         # Run the handler | ||||
|  |  | |||
|  | @ -28,7 +28,7 @@ class RequestTests(SimpleTestCase): | |||
|             "reply_channel": "test-reply", | ||||
|             "http_version": "1.1", | ||||
|             "method": "GET", | ||||
|             "path": "/test/", | ||||
|             "path": b"/test/", | ||||
|         }, "test") | ||||
|         request = AsgiRequest(message) | ||||
|         self.assertEqual(request.path, "/test/") | ||||
|  | @ -52,7 +52,7 @@ class RequestTests(SimpleTestCase): | |||
|             "reply_channel": "test", | ||||
|             "http_version": "1.1", | ||||
|             "method": "GET", | ||||
|             "path": "/test2/", | ||||
|             "path": b"/test2/", | ||||
|             "query_string": b"x=1&y=foo%20bar+baz", | ||||
|             "headers": { | ||||
|                 "host": b"example.com", | ||||
|  | @ -85,7 +85,7 @@ class RequestTests(SimpleTestCase): | |||
|             "reply_channel": "test", | ||||
|             "http_version": "1.1", | ||||
|             "method": "POST", | ||||
|             "path": "/test2/", | ||||
|             "path": b"/test2/", | ||||
|             "query_string": b"django=great", | ||||
|             "body": b"ponies=are+awesome", | ||||
|             "headers": { | ||||
|  | @ -115,7 +115,7 @@ class RequestTests(SimpleTestCase): | |||
|             "reply_channel": "test", | ||||
|             "http_version": "1.1", | ||||
|             "method": "POST", | ||||
|             "path": "/test/", | ||||
|             "path": b"/test/", | ||||
|             "body": b"there_a", | ||||
|             "body_channel": "test-input", | ||||
|             "headers": { | ||||
|  | @ -155,7 +155,7 @@ class RequestTests(SimpleTestCase): | |||
|             "reply_channel": "test", | ||||
|             "http_version": "1.1", | ||||
|             "method": "POST", | ||||
|             "path": "/test/", | ||||
|             "path": b"/test/", | ||||
|             "body_channel": "test-input", | ||||
|             "headers": { | ||||
|                 "content-type": b"multipart/form-data; boundary=BOUNDARY", | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user