summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2018-02-05 09:47:45 -0800
committerTimothy Crosley <timothy.crosley@gmail.com>2018-02-05 09:47:45 -0800
commitb85b269f655935aca0dff75892bdc3d3d0be9df5 (patch)
treec1ed720e1bb8ac813e7764d4b272f5a0e27eb1d1
parentf3edb739e33a115c11e819e7b56d46cd3636ca87 (diff)
downloadisort-feature/fix-issue-666.tar.gz
Ensure issue #666 is fixedfeature/fix-issue-666
-rw-r--r--test_isort.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py
index 500060df..20e2c4a7 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -2367,3 +2367,20 @@ def test_to_ensure_importing_from_imports_module_works_issue_662():
' from .imports import qualname\n'
' warn(description=description or qualname(fun), deprecation=deprecation, removal=removal)\n')
assert SortImports(file_contents=test_input).output == test_input
+
+
+def test_to_ensure_no_unexpected_changes_issue_666():
+ test_input = ('from django.conf import settings\n'
+ 'from django.core.management import call_command\n'
+ 'from django.core.management.base import BaseCommand\n'
+ 'from django.utils.translation import ugettext_lazy as _\n'
+ '\n'
+ 'TEMPLATE = """\n'
+ '# This file is generated automatically with the management command\n'
+ '#\n'
+ '# manage.py bis_compile_i18n\n'
+ '#\n'
+ '# please dont change it manually.\n'
+ 'from django.utils.translation import ugettext_lazy as _\n'
+ '"""\n')
+ assert SortImports(file_contents=test_input).output == test_input