Skip to content
Snippets Groups Projects
Commit 70f7b8b9 authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

fix(tests): absolute path append

parent 94ac8ba3
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ Criticality: High ...@@ -5,6 +5,7 @@ Criticality: High
Check that emails can be sent. Check that emails can be sent.
""" """
from pathlib import Path
import os import os
import subprocess import subprocess
import sys import sys
...@@ -22,7 +23,7 @@ except ImportError: ...@@ -22,7 +23,7 @@ except ImportError:
if subprocess.call(["which", "netstat"]) != 0: if subprocess.call(["which", "netstat"]) != 0:
subprocess.check_call(["apt-get", "-qq", "-y", "install", "net-tools"]) subprocess.check_call(["apt-get", "-qq", "-y", "install", "net-tools"])
sys.path.append("..") sys.path.append(str(Path(__file__).parents[1].resolve()))
# pylint: disable=wrong-import-position # pylint: disable=wrong-import-position
from envsetup import utils as u # noqa: E402 from envsetup import utils as u # noqa: E402
......
...@@ -4,6 +4,7 @@ Criticality: High ...@@ -4,6 +4,7 @@ Criticality: High
This test check the current state of the PostgreSQL database cluster. This test check the current state of the PostgreSQL database cluster.
""" """
from pathlib import Path
import re import re
import socket import socket
import subprocess import subprocess
...@@ -11,13 +12,13 @@ import sys ...@@ -11,13 +12,13 @@ import sys
import time import time
import uuid import uuid
sys.path.append("..")
try: try:
import psycopg2 import psycopg2
except ImportError: except ImportError:
sys.exit(2) sys.exit(2)
sys.path.append(str(Path(__file__).parents[1].resolve()))
# pylint: disable=wrong-import-position # pylint: disable=wrong-import-position
from envsetup import utils as u # noqa: E402 from envsetup import utils as u # noqa: E402
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment