Explicitly indicated node_modules path in nodeodm test

pull/29/head
Piero Toffanin 2016-10-05 16:07:04 -04:00
rodzic cdf663add7
commit 800ad63f14
1 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
from django.test import TestCase
from django.utils import six
import subprocess, time
from os import path
from os import path, environ
from .models import ProcessingNode
from .api_client import ApiClient
@ -14,7 +14,12 @@ class TestClientApi(TestCase):
@classmethod
def setUpClass(cls):
super(TestClientApi, cls).setUpClass()
cls.node_odm = subprocess.Popen(['node', 'index.js', '--port', '11223', '--test'], shell=False, cwd=path.join(current_dir, "external", "node-OpenDroneMap"))
node_odm_dir = path.join(current_dir, "external", "node-OpenDroneMap")
cls.node_odm = subprocess.Popen(['node', 'index.js', '--port', '11223', '--test'],
shell=False,
cwd=node_odm_dir,
env=dict(environ, NODE_PATH=path.join(node_odm_dir, "node_modules")))
time.sleep(5) # Wait for the server to launch