mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Fix test on Travis with Python 3.3
This commit is contained in:
parent
0a5aaedc7c
commit
b419001813
@ -55,15 +55,13 @@ def test_create_project_with_uuid(server):
|
||||
|
||||
|
||||
def test_show_project(server):
|
||||
query = {"project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", "path": "/tmp", "temporary": False}
|
||||
with patch("gns3server.config.Config.get_section_config", return_value={"local": True}):
|
||||
query = {"project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", "temporary": False}
|
||||
response = server.post("/projects", query)
|
||||
assert response.status == 200
|
||||
response = server.get("/projects/00010203-0405-0607-0809-0a0b0c0d0e0f", example=True)
|
||||
assert len(response.json.keys()) == 4
|
||||
assert len(response.json["location"]) > 0
|
||||
assert response.json["project_id"] == "00010203-0405-0607-0809-0a0b0c0d0e0f"
|
||||
assert response.json["path"] == "/tmp"
|
||||
assert response.json["temporary"] is False
|
||||
|
||||
|
||||
|
@ -50,12 +50,12 @@ def test_parse_arguments(capsys):
|
||||
with pytest.raises(SystemExit):
|
||||
main.parse_arguments(["-v"], server_config)
|
||||
out, err = capsys.readouterr()
|
||||
assert __version__ in err
|
||||
assert __version__ in "{}{}".format(out, err) # Depending of the Python version the location of the version change
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
main.parse_arguments(["--version"], server_config)
|
||||
out, err = capsys.readouterr()
|
||||
assert __version__ in err
|
||||
assert __version__ in "{}{}".format(out, err) # Depending of the Python version the location of the version change
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
main.parse_arguments(["-h"], server_config)
|
||||
|
Loading…
Reference in New Issue
Block a user