mirror of
https://github.com/django/daphne.git
synced 2024-11-28 18:53:44 +03:00
py2 compatibility
This commit is contained in:
parent
95351ffebb
commit
c3585c463b
|
@ -2,10 +2,10 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
from six import string_types
|
from six import string_types
|
||||||
|
import pkgutil
|
||||||
from ..server import Server
|
from ..server import Server
|
||||||
from ..cli import CommandLineInterface
|
from ..cli import CommandLineInterface
|
||||||
|
|
||||||
|
|
||||||
# this is the callable that will be tested here
|
# this is the callable that will be tested here
|
||||||
build = Server.build_endpoint_description_strings
|
build = Server.build_endpoint_description_strings
|
||||||
|
|
||||||
|
@ -72,10 +72,7 @@ class TestEndpointDescriptions(TestCase):
|
||||||
class TestCLIInterface(TestCase):
|
class TestCLIInterface(TestCase):
|
||||||
|
|
||||||
# construct a string that will be accepted as the channel_layer argument
|
# construct a string that will be accepted as the channel_layer argument
|
||||||
_import_channel_layer_string = '.'.join(
|
_import_channel_layer_string = 'daphne.tests.asgi:channel_layer'
|
||||||
__loader__.name.split('.')[:-1] +
|
|
||||||
['asgi:channel_layer']
|
|
||||||
)
|
|
||||||
|
|
||||||
def build_cli(self, cli_args=''):
|
def build_cli(self, cli_args=''):
|
||||||
# split the string and append the channel_layer positional argument
|
# split the string and append the channel_layer positional argument
|
||||||
|
@ -154,9 +151,3 @@ class TestCLIInterface(TestCase):
|
||||||
'-e imap:',
|
'-e imap:',
|
||||||
['imap:']
|
['imap:']
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user