summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test_isort.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py
index a26f8cc6..506f1ab1 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -1300,3 +1300,18 @@ from foo import (
lib7
)
"""
+
+
+def test_uses_jinja_variables():
+ """Test a basic set of imports that use jinja variables"""
+ test_input = ("import { sys }\n"
+ "import { os }\n"
+ "import { myproject.test }\n"
+ "import { django.settings }")
+ test_output = SortImports(file_contents=test_input, known_third_party=['django']).output
+ assert test_output == ("import { os }\n"
+ "import { sys }\n"
+ "\n"
+ "import { django.settings }\n"
+ "\n"
+ "import { myproject.test }\n")