diff options
author | Antoine Catton <acatton@fusionbox.com> | 2015-07-17 10:44:36 -0600 |
---|---|---|
committer | Antoine Catton <acatton@fusionbox.com> | 2015-07-17 10:44:36 -0600 |
commit | 8baf1e9c78af733d60299c4444c81501e733b434 (patch) | |
tree | 814c2ebf05e891c6496e3dbad92f1eac151544d5 /tests/test_scss.py | |
parent | a48118f5805b62c3c5fe6ada8340ba1a129e8ce9 (diff) | |
parent | 57d006ba359a9f182a8545fc6ec689e5edca6102 (diff) | |
download | django-pyscss-master.tar.gz |
Diffstat (limited to 'tests/test_scss.py')
-rw-r--r-- | tests/test_scss.py | 14 |
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 |