1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-12 19:38:57 +00:00

Test are OK

This commit is contained in:
Julien Duponchelle 2016-05-12 08:42:11 +02:00
parent 801b94a964
commit e457df1777
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -24,7 +24,7 @@ from gns3server.web.route import Route
def test_documentation_write(tmpdir):
os.makedirs(str(tmpdir / "api/examples"))
with open(str(tmpdir / "api/examples/compute_post_projectsprojectidvirtualboxvms.txt"), "w+") as f:
with open(str(tmpdir / "api/examples/compute_post_projectsprojectidvirtualboxnodes.txt"), "w+") as f:
f.write("curl test")
Documentation(Route, str(tmpdir)).write()
@ -34,9 +34,9 @@ def test_documentation_write(tmpdir):
assert os.path.exists(str(tmpdir / "api" / "v2" / "compute" / "virtualbox.rst"))
assert os.path.exists(str(tmpdir / "api" / "v2" / "compute" / "virtualbox"))
assert os.path.exists(str(tmpdir / "api" / "v2" / "compute" / "virtualbox" / "virtualboxvms.rst"))
with open(str(tmpdir / "api" / "v2" / "compute" / "virtualbox" / "projectsprojectidvirtualboxvms.rst")) as f:
with open(str(tmpdir / "api" / "v2" / "compute" / "virtualbox" / "projectsprojectidvirtualboxnodes.rst")) as f:
content = f.read()
assert "Sample session" in content
assert "literalinclude:: ../../../examples/compute_post_projectsprojectidvirtualboxvms.txt" in content
assert "literalinclude:: ../../../examples/compute_post_projectsprojectidvirtualboxnodes.txt" in content
assert os.path.exists(str(tmpdir / "api" / "v2" / "controller" / "compute.rst"))