Skip to content

Commit

Permalink
dev: Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MSAdministrator committed Jun 9, 2022
1 parent 995ff52 commit 4d49bbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
17 changes: 8 additions & 9 deletions tests/test_art.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import os
from atomic_operator.frameworks.loader import Loader
from atomic_operator.configparser import ConfigParser
from atomic_operator.runlist import RunList



def test_download_of_atomic_red_team_repo():
from atomic_operator import AtomicOperator
AtomicOperator().art.get_content(desintation=os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
AtomicOperator().art.get_content(destination=os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
for item in os.listdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))):
if 'redcanaryco-atomic-red-team' in item and os.path.isdir(item):
assert True
Expand All @@ -14,10 +15,8 @@ def test_loading_of_technique():
assert Loader().load_yaml(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data', 'atomic_operator_config.yml'))

def test_parsing_of_config():
config_parser = ConfigParser(config_file=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data', 'atomic_operator_config.yml'))
assert config_parser.is_defined('f7e6ec05-c19e-4a80-a7e7-241027992fdb')
inputs = config_parser.get_inputs('f7e6ec05-c19e-4a80-a7e7-241027992fdb')
assert inputs.get('output_file')
assert inputs.get('input_file')
assert config_parser.is_defined('3ff64f0b-3af2-3866-339d-38d9791407c3')
assert config_parser.is_defined('32f90516-4bc9-43bd-b18d-2cbe0b7ca9b2')
run_list = RunList(
adversary='apt29',
config_file=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data', 'atomic_operator_config.yml')
)
assert run_list
12 changes: 0 additions & 12 deletions tests/test_config_parser.py

This file was deleted.

0 comments on commit 4d49bbd

Please sign in to comment.