Ejemplo n.º 1
0
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])
Ejemplo n.º 3
0
 def setUp(self):
     self.preprocessors = Preprocessors()