Update examples only when launching test with documentation.sh

This commit is contained in:
Julien Duponchelle committed 2015-01-21 22:09:52 +01:00
1 parent ef4ecbfb6a
commit 8d9da999e6
9 files changed
+169 -5

No files matched your search

+2 -2
View File
@@ -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