def test_upload_file_force_syntax(self):
        fn = os.path.join(util.TEST_DIR, 'pasttle.ini')
        ct = 'text/plain'
        fh = open(fn, 'rb')
        text = fh.read()
        fh.close()
        rsp = self.app.post(
            '/post', {
                'upload': text,
                'filename': fn,
                'syntax': ct,
            }
        )
        assert rsp.status == '200 OK'
        url = urlparse.urlparse(rsp.body)
        rsp = self.app.get(
            '/raw{0}'.format(url.path.decode(),),
        )
        assert rsp.status == '200 OK'
        assert rsp.body == text
        assert rsp.content_type == ct
Upload any file, expect a 200 and forced mime type
dataset/ETHPy150Open thekad/pasttle/tests/suites/functional.py/FunctionalTest.test_upload_file_force_syntax