Skip to content

Commit

Permalink
tests: fix listattributes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamilcuk committed Sep 2, 2024
1 parent fe4d0c7 commit 37e50fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 0 additions & 6 deletions tests/integration/test_constrainteval.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,3 @@ def test_constrainteval_3():
)
assert pp.stdout is not None
assert pp.stdout == ""


def test_constrainteval_prefix():
pp = run_nomadt("constrainteval --json --prefix attr.", stdout=subprocess.PIPE)
assert pp.stdout
assert len(json.loads(pp.stdout)) >= 10, f"{pp}"
13 changes: 13 additions & 0 deletions tests/integration/test_listattributes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import json
import subprocess

from tests.testlib import run_nomadt


def test_listattributes_1():
pp = run_nomadt("listattributes --json", stdout=subprocess.PIPE)
assert pp.stdout
name = json.loads(pp.stdout)[0]["node.unique.name"]
pp = run_nomadt(f"listattributes --json {name}", stdout=subprocess.PIPE)
assert pp.stdout
assert json.loads(pp.stdout)[0]["node.unique.name"] == name

0 comments on commit 37e50fe

Please sign in to comment.