Fix tests on MacOS

This commit is contained in:
Julien Duponchelle
2015-02-27 18:30:22 +01:00
parent 38326f7d72
commit ae7bf828cd
3 changed files with 11 additions and 6 deletions

View File

@ -15,14 +15,20 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pytest
import socket
import asyncio
import tempfile
import shutil
import os
import sys
from aiohttp import web
sys._called_from_test = True
# Prevent execution of external binaries
os.environ["PATH"] = tempfile.mkdtemp()
from gns3server.config import Config
from gns3server.web.route import Route
# TODO: get rid of *
@ -33,10 +39,6 @@ from gns3server.modules.project_manager import ProjectManager
from tests.handlers.api.base import Query
# Prevent execution of external binaries
os.environ["PATH"] = tempfile.mkdtemp()
@pytest.yield_fixture
def restore_original_path():
"""