mirror of
https://github.com/django/daphne.git
synced 2025-07-14 18:02:17 +03:00
Fix up tests under py3
This commit is contained in:
parent
b374a2a604
commit
7bc35f1842
|
@ -21,7 +21,7 @@ class RequestTests(ChannelTestCase):
|
||||||
"reply_channel": "test-reply",
|
"reply_channel": "test-reply",
|
||||||
"http_version": "1.1",
|
"http_version": "1.1",
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"path": b"/test/",
|
"path": "/test/",
|
||||||
})
|
})
|
||||||
request = AsgiRequest(self.get_next_message("test"))
|
request = AsgiRequest(self.get_next_message("test"))
|
||||||
self.assertEqual(request.path, "/test/")
|
self.assertEqual(request.path, "/test/")
|
||||||
|
@ -45,8 +45,8 @@ class RequestTests(ChannelTestCase):
|
||||||
"reply_channel": "test",
|
"reply_channel": "test",
|
||||||
"http_version": "1.1",
|
"http_version": "1.1",
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"path": b"/test2/",
|
"path": "/test2/",
|
||||||
"query_string": b"x=1&y=foo%20bar+baz",
|
"query_string": "x=1&y=foo bar+baz",
|
||||||
"headers": {
|
"headers": {
|
||||||
"host": b"example.com",
|
"host": b"example.com",
|
||||||
"cookie": b"test-time=1448995585123; test-value=yeah",
|
"cookie": b"test-time=1448995585123; test-value=yeah",
|
||||||
|
@ -78,8 +78,8 @@ class RequestTests(ChannelTestCase):
|
||||||
"reply_channel": "test",
|
"reply_channel": "test",
|
||||||
"http_version": "1.1",
|
"http_version": "1.1",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"path": b"/test2/",
|
"path": "/test2/",
|
||||||
"query_string": b"django=great",
|
"query_string": "django=great",
|
||||||
"body": b"ponies=are+awesome",
|
"body": b"ponies=are+awesome",
|
||||||
"headers": {
|
"headers": {
|
||||||
"host": b"example.com",
|
"host": b"example.com",
|
||||||
|
@ -108,7 +108,7 @@ class RequestTests(ChannelTestCase):
|
||||||
"reply_channel": "test",
|
"reply_channel": "test",
|
||||||
"http_version": "1.1",
|
"http_version": "1.1",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"path": b"/test/",
|
"path": "/test/",
|
||||||
"body": b"there_a",
|
"body": b"there_a",
|
||||||
"body_channel": "test-input",
|
"body_channel": "test-input",
|
||||||
"headers": {
|
"headers": {
|
||||||
|
@ -148,7 +148,7 @@ class RequestTests(ChannelTestCase):
|
||||||
"reply_channel": "test",
|
"reply_channel": "test",
|
||||||
"http_version": "1.1",
|
"http_version": "1.1",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"path": b"/test/",
|
"path": "/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",
|
||||||
|
@ -178,7 +178,7 @@ class RequestTests(ChannelTestCase):
|
||||||
"reply_channel": "test",
|
"reply_channel": "test",
|
||||||
"http_version": "1.1",
|
"http_version": "1.1",
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
"path": b"/",
|
"path": "/",
|
||||||
"body": b"onetwothree",
|
"body": b"onetwothree",
|
||||||
"headers": {
|
"headers": {
|
||||||
"host": b"example.com",
|
"host": b"example.com",
|
||||||
|
@ -198,7 +198,7 @@ class RequestTests(ChannelTestCase):
|
||||||
"reply_channel": "test",
|
"reply_channel": "test",
|
||||||
"http_version": "1.1",
|
"http_version": "1.1",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"path": b"/test/",
|
"path": "/test/",
|
||||||
"body": b"there_a",
|
"body": b"there_a",
|
||||||
"body_channel": "test-input",
|
"body_channel": "test-input",
|
||||||
"headers": {
|
"headers": {
|
||||||
|
@ -227,7 +227,7 @@ class RequestTests(ChannelTestCase):
|
||||||
"reply_channel": "test",
|
"reply_channel": "test",
|
||||||
"http_version": "1.1",
|
"http_version": "1.1",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"path": b"/test/",
|
"path": "/test/",
|
||||||
"body": b"there_a",
|
"body": b"there_a",
|
||||||
"body_channel": "test-input",
|
"body_channel": "test-input",
|
||||||
"headers": {
|
"headers": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user