def test_bundle_zip(self):
     '''Should bundle and initiate a zip file download.'''
     handler = MockHandler(self.tmp)
     converter.bundle(handler, 'test/resources/some.ipynb')
 
     output_dir = pjoin(self.tmp, 'some')
     self.assertFalse(isdir(output_dir), 'app directory should no longer exist')
     self.assertTrue(handler.written, 'data should be written')
     self.assertTrue(handler.finished, 'response should be finished')
     self.assertIn('application/zip', handler.headers['Content-Type'], 
         'headers should set zip content type')
     self.assertIn('some.zip', handler.headers['Content-Disposition'], 
         'headers should name the zip file')
 def test_bundle_ipynb(self):
     '''Should initialize an ipynb file download.'''
     handler = MockHandler(self.tmp)
     converter.bundle(handler, 'test/resources/no_imports.ipynb')
     
     output_dir = pjoin(self.tmp, 'no_imports')
     self.assertFalse(isdir(output_dir), 'app directory should no longer exist')
     self.assertTrue(handler.written, 'data should be written')
     self.assertTrue(handler.finished, 'response should be finished')
     self.assertIn('application/json', handler.headers['Content-Type'], 
         'headers should set json content type')
     self.assertIn('no_imports.ipynb', handler.headers['Content-Disposition'], 
         'headers should name the ipynb file')