mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Update examples only when launching test with documentation.sh
This commit is contained in:
1 parent
ef4ecbfb6a
commit
8d9da999e6
9 files changed
+169
-5
No files matched your search
+2
-2
@@ -25,7 +25,7 @@ import socket
|
||||
import pytest
|
||||
from aiohttp import web
|
||||
import aiohttp
|
||||
|
||||
import os
|
||||
|
||||
from gns3server.web.route import Route
|
||||
# TODO: get rid of *
|
||||
@@ -93,7 +93,7 @@ class Query:
|
||||
response.json = None
|
||||
else:
|
||||
response.json = {}
|
||||
if kwargs.get('example'):
|
||||
if kwargs.get('example') and os.environ.get("PYTEST_BUILD_DOCUMENTATION") == "1":
|
||||
self._dump_example(method, response.route, body, response)
|
||||
return response
|
||||
|
||||
|
||||
Reference in new issue
Block a user