2021-12-16 11:50:12 +00:00
|
|
|
import os
|
|
|
|
|
2022-01-07 16:03:53 +00:00
|
|
|
|
2021-12-16 11:50:12 +00:00
|
|
|
def get_artifact(fname):
|
|
|
|
"""
|
|
|
|
Return the artifact path in the artifact folder
|
|
|
|
"""
|
|
|
|
DATA_FOLDER = os.path.join(os.path.dirname(__file__), "artifacts")
|
|
|
|
fpath = os.path.join(DATA_FOLDER, fname)
|
|
|
|
if os.path.isfile(fpath):
|
|
|
|
return fpath
|
|
|
|
return
|
|
|
|
|
2022-01-07 16:03:53 +00:00
|
|
|
|
2021-12-16 11:50:12 +00:00
|
|
|
def get_artifact_folder():
|
|
|
|
return os.path.join(os.path.dirname(__file__), "artifacts")
|
|
|
|
|
2022-01-07 16:03:53 +00:00
|
|
|
|
2021-12-16 11:50:12 +00:00
|
|
|
def init_setup():
|
|
|
|
"""
|
|
|
|
init data to have a clean state before testing
|
|
|
|
"""
|
|
|
|
try:
|
|
|
|
del os.environ['MVT_STIX2']
|
|
|
|
except KeyError:
|
|
|
|
pass
|