class PreprocessorsTests(TestCase): def setUp(self): self.preprocessors = Preprocessors() def test_register_defaults(self): self.preprocessors.register_defaults() self.assertItemsEqual(self.preprocessors.keys(), ['text/css', 'application/javascript']) self.assertEqual(self.preprocessors['text/css'], [DirectivesProcessor]) self.assertEqual(self.preprocessors['application/javascript'], [DirectivesProcessor])
class PreprocessorsTests(TestCase): def setUp(self): self.preprocessors = Preprocessors() def test_register_defaults(self): self.preprocessors.register_defaults() self.assertItemsEqual(self.preprocessors.keys(), ['text/css', 'application/javascript']) self.assertEqual( [p.handler_class for p in self.preprocessors['text/css']], [DirectivesProcessor]) self.assertEqual( [p.handler_class for p in self.preprocessors['application/javascript']], [DirectivesProcessor])
def setUp(self): self.preprocessors = Preprocessors()