mirror of
https://github.com/mvt-project/mvt.git
synced 2024-07-01 00:19:02 +00:00
22 lines
532 B
Python
22 lines
532 B
Python
|
import os
|
||
|
|
||
|
import pytest
|
||
|
|
||
|
from .artifacts.generate_stix import generate_test_stix_file
|
||
|
|
||
|
|
||
|
@pytest.fixture(scope="session", autouse=True)
|
||
|
def indicator_file(request, tmp_path_factory):
|
||
|
indicator_dir = tmp_path_factory.mktemp("indicators")
|
||
|
stix_path = indicator_dir / "indicators.stix2"
|
||
|
generate_test_stix_file(stix_path)
|
||
|
return str(stix_path)
|
||
|
|
||
|
|
||
|
@pytest.fixture(scope="session", autouse=True)
|
||
|
def clean_test_env(request, tmp_path_factory):
|
||
|
try:
|
||
|
del os.environ['MVT_STIX2']
|
||
|
except KeyError:
|
||
|
pass
|