Skip to content

Commit

Permalink
Added TC for MTA 484
Browse files Browse the repository at this point in the history
  • Loading branch information
midays committed Mar 18, 2024
1 parent 57431f1 commit f1e8215
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/tests/vscode/test_sources_targets_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import json
import os

import pytest

from src.utils.general import read_file
from src.utils.general import run_command

DATA_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) + "/data/"


@pytest.mark.vscode
def test_sources_list(config):
# Automates Polarion MTA-484
kantra_cli_path = config["kantra_cli_path"]
expected_source_list = json.loads(read_file(DATA_DIR + "kantra_sources_targets_list.json"))["sources"]
command = " analyze --list-sources"
stdout = run_command(kantra_cli_path + command)
found_source_list = stdout.split("\n")[1:-1]
assert sorted(found_source_list) == sorted(expected_source_list), f"Some expected sources are missing {set(found_source_list) - set(expected_source_list)}"

0 comments on commit f1e8215

Please sign in to comment.