Skip to content

Commit 5257b14

Browse files
author
Alex Behrens
committed
fix string encoding in test for python 3.x
1 parent 06e45fa commit 5257b14

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

tests/test_upload_n_download_excel.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ def test_download(self):
4747
def test_override_file_name(self):
4848
for file_type in FILE_TYPE_MIME_TABLE.keys():
4949
file_name = 'override_file_name'
50-
response = self.app.post('/file_name/%s/%s' % (file_type, file_name),
51-
buffered=True,
52-
data={"data": self.data},
53-
content_type="multipart/form-data")
50+
response = self.app.post('/file_name/%s/%s' % (file_type, file_name))
5451
assert response.content_type == FILE_TYPE_MIME_TABLE[file_type]
5552
assert response.headers.get("Content-Disposition", None) == ("attachment; filename=%s.%s" % (file_name, file_type))
5653

tests/testapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def switch(file_type):
7878

7979
@app.route("/file_name/<file_type>/<file_name>", methods=['POST'])
8080
def swtich_file_name(file_type, file_name):
81-
return excel.make_response(pe.Sheet(request.form.get("data", None)), file_type, file_name=file_name)
81+
return excel.make_response(pe.Sheet(["a", "b", "c"]), file_type, file_name=file_name)
8282

8383
@app.route("/exchange/<struct_type>", methods=['POST'])
8484
def upload_array(struct_type):

0 commit comments

Comments
 (0)