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)
def setUp(self): self.js = CompressJavascript()