예제 #1
0
class TestCompressJavascript(object):
    def setUp(self):
        self.js = CompressJavascript()

    def testDoesntMorphPath(self):
        metadata, data = self.js.process_and_return(
            {'output_path': 'test.js'}, 
            ''
        )

        assert metadata['output_path'] == 'test.js'

    def testCompressJavascript(self):
        input = 'function test() {\nalert("Test!");}'
        metadata, data = self.js.process_and_return(
            {'output_path': 'test.js'},
            input
        )

        assert len(data) < len(input)
예제 #2
0
 def setUp(self):
     self.js = CompressJavascript()