issue #477: ModuleFinder now returns Unicode module names.

issue510
David Wilson 6 years ago
parent 4c1ddf6fc1
commit d4897d37bb

@ -222,22 +222,22 @@ class FindRelatedImportsTest(DjangoMixin, testlib.TestCase):
related = self.call('django.db.models')
self.maxDiff=None
self.assertEquals(related, [
'django',
'django.core.exceptions',
'django.db',
'django.db.models',
'django.db.models.aggregates',
'django.db.models.base',
'django.db.models.deletion',
'django.db.models.expressions',
'django.db.models.fields',
'django.db.models.fields.files',
'django.db.models.fields.related',
'django.db.models.fields.subclassing',
'django.db.models.loading',
'django.db.models.manager',
'django.db.models.query',
'django.db.models.signals',
u'django',
u'django.core.exceptions',
u'django.db',
u'django.db.models',
u'django.db.models.aggregates',
u'django.db.models.base',
u'django.db.models.deletion',
u'django.db.models.expressions',
u'django.db.models.fields',
u'django.db.models.fields.files',
u'django.db.models.fields.related',
u'django.db.models.fields.subclassing',
u'django.db.models.loading',
u'django.db.models.manager',
u'django.db.models.query',
u'django.db.models.signals',
])
@ -248,11 +248,11 @@ class FindRelatedTest(DjangoMixin, testlib.TestCase):
return self.klass().find_related(fullname)
SIMPLE_EXPECT = set([
'mitogen',
'mitogen.core',
'mitogen.master',
'mitogen.minify',
'mitogen.parent',
u'mitogen',
u'mitogen.core',
u'mitogen.master',
u'mitogen.minify',
u'mitogen.parent',
])
if sys.version_info < (3, 2):
@ -278,23 +278,23 @@ class DjangoFindRelatedTest(DjangoMixin, testlib.TestCase):
import django.db
related = self.call('django.db')
self.assertEquals(related, [
'django',
'django.conf',
'django.conf.global_settings',
'django.core',
'django.core.exceptions',
'django.core.signals',
'django.db.utils',
'django.dispatch',
'django.dispatch.dispatcher',
'django.dispatch.saferef',
'django.utils',
'django.utils._os',
'django.utils.encoding',
'django.utils.functional',
'django.utils.importlib',
'django.utils.module_loading',
'django.utils.six',
u'django',
u'django.conf',
u'django.conf.global_settings',
u'django.core',
u'django.core.exceptions',
u'django.core.signals',
u'django.db.utils',
u'django.dispatch',
u'django.dispatch.dispatcher',
u'django.dispatch.saferef',
u'django.utils',
u'django.utils._os',
u'django.utils.encoding',
u'django.utils.functional',
u'django.utils.importlib',
u'django.utils.module_loading',
u'django.utils.six',
])
def test_django_db_models(self):
@ -304,93 +304,93 @@ class DjangoFindRelatedTest(DjangoMixin, testlib.TestCase):
import django.db.models
related = self.call('django.db.models')
self.assertEquals(related, [
'django',
'django.conf',
'django.conf.global_settings',
'django.core',
'django.core.exceptions',
'django.core.files',
'django.core.files.base',
'django.core.files.images',
'django.core.files.locks',
'django.core.files.move',
'django.core.files.storage',
'django.core.files.utils',
'django.core.signals',
'django.core.validators',
'django.db',
'django.db.backends',
'django.db.backends.signals',
'django.db.backends.util',
'django.db.models.aggregates',
'django.db.models.base',
'django.db.models.constants',
'django.db.models.deletion',
'django.db.models.expressions',
'django.db.models.fields',
'django.db.models.fields.files',
'django.db.models.fields.proxy',
'django.db.models.fields.related',
'django.db.models.fields.subclassing',
'django.db.models.loading',
'django.db.models.manager',
'django.db.models.options',
'django.db.models.query',
'django.db.models.query_utils',
'django.db.models.related',
'django.db.models.signals',
'django.db.models.sql',
'django.db.models.sql.aggregates',
'django.db.models.sql.constants',
'django.db.models.sql.datastructures',
'django.db.models.sql.expressions',
'django.db.models.sql.query',
'django.db.models.sql.subqueries',
'django.db.models.sql.where',
'django.db.transaction',
'django.db.utils',
'django.dispatch',
'django.dispatch.dispatcher',
'django.dispatch.saferef',
'django.forms',
'django.forms.fields',
'django.forms.forms',
'django.forms.formsets',
'django.forms.models',
'django.forms.util',
'django.forms.widgets',
'django.utils',
'django.utils._os',
'django.utils.crypto',
'django.utils.datastructures',
'django.utils.dateformat',
'django.utils.dateparse',
'django.utils.dates',
'django.utils.datetime_safe',
'django.utils.decorators',
'django.utils.deprecation',
'django.utils.encoding',
'django.utils.formats',
'django.utils.functional',
'django.utils.html',
'django.utils.html_parser',
'django.utils.importlib',
'django.utils.ipv6',
'django.utils.itercompat',
'django.utils.module_loading',
'django.utils.numberformat',
'django.utils.safestring',
'django.utils.six',
'django.utils.text',
'django.utils.timezone',
'django.utils.translation',
'django.utils.tree',
'django.utils.tzinfo',
'pytz',
'pytz.exceptions',
'pytz.lazy',
'pytz.tzfile',
'pytz.tzinfo',
u'django',
u'django.conf',
u'django.conf.global_settings',
u'django.core',
u'django.core.exceptions',
u'django.core.files',
u'django.core.files.base',
u'django.core.files.images',
u'django.core.files.locks',
u'django.core.files.move',
u'django.core.files.storage',
u'django.core.files.utils',
u'django.core.signals',
u'django.core.validators',
u'django.db',
u'django.db.backends',
u'django.db.backends.signals',
u'django.db.backends.util',
u'django.db.models.aggregates',
u'django.db.models.base',
u'django.db.models.constants',
u'django.db.models.deletion',
u'django.db.models.expressions',
u'django.db.models.fields',
u'django.db.models.fields.files',
u'django.db.models.fields.proxy',
u'django.db.models.fields.related',
u'django.db.models.fields.subclassing',
u'django.db.models.loading',
u'django.db.models.manager',
u'django.db.models.options',
u'django.db.models.query',
u'django.db.models.query_utils',
u'django.db.models.related',
u'django.db.models.signals',
u'django.db.models.sql',
u'django.db.models.sql.aggregates',
u'django.db.models.sql.constants',
u'django.db.models.sql.datastructures',
u'django.db.models.sql.expressions',
u'django.db.models.sql.query',
u'django.db.models.sql.subqueries',
u'django.db.models.sql.where',
u'django.db.transaction',
u'django.db.utils',
u'django.dispatch',
u'django.dispatch.dispatcher',
u'django.dispatch.saferef',
u'django.forms',
u'django.forms.fields',
u'django.forms.forms',
u'django.forms.formsets',
u'django.forms.models',
u'django.forms.util',
u'django.forms.widgets',
u'django.utils',
u'django.utils._os',
u'django.utils.crypto',
u'django.utils.datastructures',
u'django.utils.dateformat',
u'django.utils.dateparse',
u'django.utils.dates',
u'django.utils.datetime_safe',
u'django.utils.decorators',
u'django.utils.deprecation',
u'django.utils.encoding',
u'django.utils.formats',
u'django.utils.functional',
u'django.utils.html',
u'django.utils.html_parser',
u'django.utils.importlib',
u'django.utils.ipv6',
u'django.utils.itercompat',
u'django.utils.module_loading',
u'django.utils.numberformat',
u'django.utils.safestring',
u'django.utils.six',
u'django.utils.text',
u'django.utils.timezone',
u'django.utils.translation',
u'django.utils.tree',
u'django.utils.tzinfo',
u'pytz',
u'pytz.exceptions',
u'pytz.lazy',
u'pytz.tzfile',
u'pytz.tzinfo',
])
if __name__ == '__main__':

Loading…
Cancel
Save