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
Check that emails can be sent.
"""
from pathlib import Path
import os
import subprocess
import sys
......@@ -22,7 +23,7 @@ except ImportError:
if subprocess.call(["which", "netstat"]) != 0:
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
from envsetup import utils as u # noqa: E402
......
......@@ -4,6 +4,7 @@ Criticality: High
This test check the current state of the PostgreSQL database cluster.
"""
from pathlib import Path
import re
import socket
import subprocess
......@@ -11,13 +12,13 @@ import sys
import time
import uuid
sys.path.append("..")
try:
import psycopg2
except ImportError:
sys.exit(2)
sys.path.append(str(Path(__file__).parents[1].resolve()))
# pylint: disable=wrong-import-position
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