All tests pass on windows

This commit is contained in:
Julien Duponchelle committed 2016-09-28 10:27:30 +02:00
1 parent e01931269f
commit fb2dac6ef1
6 files changed
+19 -9

No files matched your search

@@ -19,12 +19,14 @@
This test suite check /version endpoint
It's also used for unittest the HTTP implementation.
"""
import sys
import pytest
from gns3server.config import Config
from gns3server.version import __version__
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
def test_get(http_compute, windows_platform):
"""
Nat, is supported outside linux
@@ -34,6 +36,7 @@ def test_get(http_compute, windows_platform):
assert response.json == {'node_types': ['cloud', 'ethernet_hub', 'ethernet_switch', 'vpcs', 'virtualbox', 'dynamips', 'frame_relay_switch', 'atm_switch', 'qemu', 'vmware', 'docker', 'iou'], 'version': __version__}
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
def test_get_on_gns3vm(http_compute, on_gns3vm):
response = http_compute.get('/capabilities', example=True)
assert response.status == 200
@@ -26,6 +26,7 @@ from tests.utils import asyncio_patch
from unittest.mock import patch, MagicMock, PropertyMock
from gns3server.compute.docker import Docker
pytestmark = pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
@pytest.fixture
def base_params():
+6 -1
View File
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import sys
import urllib.parse
from gns3server.config import Config
@@ -34,7 +35,11 @@ def test_symbols(http_controller):
def test_get(http_controller):
response = http_controller.get('/symbols/' + urllib.parse.quote(':/symbols/firewall.svg') + '/raw')
assert response.status == 200
assert response.headers['CONTENT-LENGTH'] == '9381'
# 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-TYPE'] == 'image/svg+xml'
assert '</svg>' in response.html