mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Fix various tests for windows
This commit is contained in:
parent
3de04d6e76
commit
36de30e25e
@ -79,7 +79,7 @@ def list_images(type):
|
|||||||
|
|
||||||
images.append({
|
images.append({
|
||||||
"filename": filename,
|
"filename": filename,
|
||||||
"path": path,
|
"path": force_unix_path(path),
|
||||||
"md5sum": md5sum(os.path.join(root, filename)),
|
"md5sum": md5sum(os.path.join(root, filename)),
|
||||||
"filesize": os.stat(os.path.join(root, filename)).st_size})
|
"filesize": os.stat(os.path.join(root, filename)).st_size})
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
|
@ -35,10 +35,6 @@ def test_symbols(http_controller):
|
|||||||
def test_get(http_controller):
|
def test_get(http_controller):
|
||||||
response = http_controller.get('/symbols/' + urllib.parse.quote(':/symbols/firewall.svg') + '/raw')
|
response = http_controller.get('/symbols/' + urllib.parse.quote(':/symbols/firewall.svg') + '/raw')
|
||||||
assert response.status == 200
|
assert response.status == 200
|
||||||
# Different carriage return
|
|
||||||
if sys.platform.startswith("win"):
|
|
||||||
assert response.headers['CONTENT-LENGTH'] == '9568'
|
|
||||||
else:
|
|
||||||
assert response.headers['CONTENT-LENGTH'] == '9381'
|
assert response.headers['CONTENT-LENGTH'] == '9381'
|
||||||
assert response.headers['CONTENT-TYPE'] == 'image/svg+xml'
|
assert response.headers['CONTENT-TYPE'] == 'image/svg+xml'
|
||||||
assert '</svg>' in response.html
|
assert '</svg>' in response.html
|
||||||
|
Loading…
Reference in New Issue
Block a user