Fix tests

This commit is contained in:
Julien Duponchelle 2015-02-24 10:07:22 +01:00
parent 1ca445d5f5
commit fd03b36258

View File

@ -38,7 +38,7 @@ def test_upload(server, tmpdir):
body = aiohttp.FormData() body = aiohttp.FormData()
body.add_field("file", open(str(tmpdir / "test"), "rb"), content_type="application/iou", filename="test2") body.add_field("file", open(str(tmpdir / "test"), "rb"), content_type="application/iou", filename="test2")
with patch("gns3server.config.Config.get_section_config", return_value={"image_directory": str(tmpdir)}): with patch("gns3server.config.Config.get_section_config", return_value={"images_path": str(tmpdir)}):
response = server.post('/upload', api_version=None, body=body, raw=True) response = server.post('/upload', api_version=None, body=body, raw=True)
with open(str(tmpdir / "test2")) as f: with open(str(tmpdir / "test2")) as f: