mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Use aiofiles where relevant.
This commit is contained in:
1 parent
b0df7ecabf
commit
af80b0bb6e
17 files changed
+90
-234
No files matched your search
@@ -34,11 +34,11 @@ def test_response_file(async_run, tmpdir, response):
|
||||
with open(filename, 'w+') as f:
|
||||
f.write('world')
|
||||
|
||||
async_run(response.file(filename))
|
||||
async_run(response.stream_file(filename))
|
||||
assert response.status == 200
|
||||
|
||||
|
||||
def test_response_file_not_found(async_run, tmpdir, response):
|
||||
filename = str(tmpdir / 'hello-not-found')
|
||||
|
||||
pytest.raises(HTTPNotFound, lambda: async_run(response.file(filename)))
|
||||
pytest.raises(HTTPNotFound, lambda: async_run(response.stream_file(filename)))
|
||||
Reference in new issue
Block a user