py2 compatibility

This commit is contained in:
Sean Mc Allister 2016-08-11 22:36:57 +02:00
parent 95351ffebb
commit c3585c463b

View File

@ -2,10 +2,10 @@
from __future__ import unicode_literals
from unittest import TestCase
from six import string_types
import pkgutil
from ..server import Server
from ..cli import CommandLineInterface
# this is the callable that will be tested here
build = Server.build_endpoint_description_strings
@ -72,10 +72,7 @@ class TestEndpointDescriptions(TestCase):
class TestCLIInterface(TestCase):
# construct a string that will be accepted as the channel_layer argument
_import_channel_layer_string = '.'.join(
__loader__.name.split('.')[:-1] +
['asgi:channel_layer']
)
_import_channel_layer_string = 'daphne.tests.asgi:channel_layer'
def build_cli(self, cli_args=''):
# split the string and append the channel_layer positional argument
@ -154,9 +151,3 @@ class TestCLIInterface(TestCase):
'-e imap:',
['imap:']
)