about summary refs log tree commit diff
path: root/tests/unit/test_privileges_checking.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-07-22 17:03:37 -0500
committerFrederick Muriuki Muriithi2025-07-22 17:03:37 -0500
commit7522a8eb4232a4fcb03c1af41b70e3f9c25702ca (patch)
tree626edd84870917ee5900251c97b03037d5bd0b9d /tests/unit/test_privileges_checking.py
parent2fae0c6811fe53494e0cfbffc93b15450ecf5423 (diff)
downloadgn-libs-7522a8eb4232a4fcb03c1af41b70e3f9c25702ca.tar.gz
Begin working on simple DSL for privileges checking.
Diffstat (limited to 'tests/unit/test_privileges_checking.py')
-rw-r--r--tests/unit/test_privileges_checking.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unit/test_privileges_checking.py b/tests/unit/test_privileges_checking.py
new file mode 100644
index 0000000..460344f
--- /dev/null
+++ b/tests/unit/test_privileges_checking.py
@@ -0,0 +1,16 @@
+"""Tests to verify the privileges check works."""
+import pytest
+
+from gn_libs.privileges import check
+
+@pytest.mark.unit_test
+@pytest.mark.parametrize(
+    "spec,privileges,expected",
+    ())
+def test_check(spec, privileges, expected):
+    """
+    GIVEN: A privileges-check specification, and a tuple of privileges
+    WHEN: A check is performed
+    THEN: Verify that the check returns the expected value
+    """
+    assert check(spec, privileges) == expected