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