summaryrefslogtreecommitdiff
path: root/tests/test_scss.py
diff options
context:
space:
mode:
authorAntoine Catton <acatton@fusionbox.com>2015-07-17 10:44:36 -0600
committerAntoine Catton <acatton@fusionbox.com>2015-07-17 10:44:36 -0600
commit8baf1e9c78af733d60299c4444c81501e733b434 (patch)
tree814c2ebf05e891c6496e3dbad92f1eac151544d5 /tests/test_scss.py
parenta48118f5805b62c3c5fe6ada8340ba1a129e8ce9 (diff)
parent57d006ba359a9f182a8545fc6ec689e5edca6102 (diff)
downloaddjango-pyscss-master.tar.gz
Merge pull request #38HEADmaster
Diffstat (limited to 'tests/test_scss.py')
-rw-r--r--tests/test_scss.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_scss.py b/tests/test_scss.py
index f76b3e7..c1410e1 100644
--- a/tests/test_scss.py
+++ b/tests/test_scss.py
@@ -40,6 +40,9 @@ BAZ_CONTENTS = BAZ_CONTENTS.replace('@import "sub/spam";', SPAM_CONTENTS)
with open(os.path.join(settings.BASE_DIR, 'testproject', 'static', 'css', 'path_conflict.scss')) as f:
PATH_CONFLICT_CONTENTS = f.read()
+with open(os.path.join(settings.BASE_DIR, 'testproject', 'static', 'css', 'dot.file.scss')) as f:
+ DOT_FILE_CONTENTS = f.read()
+
class CompilerTestMixin(object):
def setUp(self):
@@ -103,6 +106,17 @@ class ImportTestMixin(CompilerTestMixin):
actual = self.compiler.compile_string('@import "/css/path_conflict";')
self.assertEqual(clean_css(actual), clean_css(PATH_CONFLICT_CONTENTS))
+ def test_import_dots_without_extension(self):
+ actual = self.compiler.compile_string('@import "/css/dot.file";')
+ self.assertEqual(clean_css(actual), clean_css(DOT_FILE_CONTENTS))
+
+ def test_import_dots_with_extension(self):
+ actual = self.compiler.compile_string('@import "/css/dot.file.scss";')
+ self.assertEqual(clean_css(actual), clean_css(DOT_FILE_CONTENTS))
+
+ def test_import_from_parent(self):
+ actual = self.compiler.compile_string('@import "/css/sub/from_parent";')
+ self.assertEqual(clean_css(actual), clean_css(BAZ_CONTENTS))
class FindersImportTest(ImportTestMixin, NoCollectStaticTestCase):
pass