def test_compress_setting(self, mock_call_command): with override_settings(STATICFILESPLUS_LESS_COMPRESS=True): LESSProcessor().process_file('inpath', 'outpath') self.assertEqual(mock_call_command.call_args[0][0], [ 'lessc', '--include-path=/dev/null:/dev/zero', '--compress', 'inpath', 'outpath' ])
def test_does_not_ignore_paths_without_underscores(self): processor = LESSProcessor() self.assertFalse(processor.is_ignored_file('dir_/path/file')) self.assertFalse(processor.is_ignored_file('dir/path_sep/file'))
def test_ignores_paths_with_underscores(self): processor = LESSProcessor() self.assertTrue(processor.is_ignored_file('_dir/path/file')) self.assertTrue(processor.is_ignored_file('dir/path/_file'))
def test_does_not_ignore_paths_without_underscores(self): processor = LESSProcessor() self.assertFalse(processor.is_ignored_file('dir_/path/file')) self.assertFalse(processor.is_ignored_file('dir/path_sep/file'))
def test_ignores_paths_with_underscores(self): processor = LESSProcessor() self.assertTrue(processor.is_ignored_file('_dir/path/file')) self.assertTrue(processor.is_ignored_file('dir/path/_file'))
def test_calls_out_to_lessc(self, mock_call_command): LESSProcessor().process_file('inpath', 'outpath') self.assertEqual(mock_call_command.call_args[0][0], [ 'lessc', '--include-path=/dev/null:/dev/zero', 'inpath', 'outpath' ])