From 7c1a079ee83c2e65e983e1652a4ebd1db0c2fd85 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 2 Nov 2016 10:08:49 +0100 Subject: [PATCH] Add a test for unicode characters in /images Ref #756 --- tests/handlers/api/compute/test_qemu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/handlers/api/compute/test_qemu.py b/tests/handlers/api/compute/test_qemu.py index ec61dea7..4e049d4f 100644 --- a/tests/handlers/api/compute/test_qemu.py +++ b/tests/handlers/api/compute/test_qemu.py @@ -231,13 +231,13 @@ def test_images(http_compute, tmpdir, fake_qemu_vm): def test_upload_image(http_compute, tmpdir): with patch("gns3server.compute.Qemu.get_images_directory", return_value=str(tmpdir),): - response = http_compute.post("/qemu/images/test2", body="TEST", raw=True) + response = http_compute.post("/qemu/images/test2使", body="TEST", raw=True) assert response.status == 204 - with open(str(tmpdir / "test2")) as f: + with open(str(tmpdir / "test2使")) as f: assert f.read() == "TEST" - with open(str(tmpdir / "test2.md5sum")) as f: + with open(str(tmpdir / "test2使.md5sum")) as f: checksum = f.read() assert checksum == "033bd94b1168d7e4f0d644c3c95e35bf"