def test_process_files_with_config_with_shell_injection(self): config = {'ignore': '`cat /etc/passwd`'} tool = Csslint(self.problems, config, root_dir) tool.process_files([self.fixtures[1]]) problems = self.problems.all(self.fixtures[1]) assert len(problems) > 0, 'Shell injection fale'
def test_process_files_with_config(self): config = {'ignore': 'box-model'} tool = Csslint(self.problems, config, root_dir) tool.process_files([self.fixtures[1]]) problems = self.problems.all(self.fixtures[1]) eq_(1, len(problems), 'Config file should lower error count.')
def test_process_files_with_ignore_list(self): config = {'ignore': ['box-model', 'id']} tool = Csslint(self.problems, config, root_dir) tool.process_files([self.fixtures[1]]) problems = self.problems.all(self.fixtures[1]) self.assertEqual(1, len(problems), 'Config file should lower error count.')
def setUp(self): self.problems = Problems() self.tool = Csslint(self.problems, base_path=root_dir)
def setUp(self): self.problems = Problems() self.tool = Csslint(self.problems)