]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
fixed tests
authorVasek Sraier <git@vakabus.cz>
Mon, 18 Oct 2021 11:42:45 +0000 (13:42 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Fri, 8 Apr 2022 14:17:53 +0000 (16:17 +0200)
manager/tests/utils/test_functional.py

index d417f1e678f25d89725d1a8e45724b78b57d2651..041748e44df161f4b758192a001b6639c9d2b97b 100644 (file)
@@ -1,4 +1,4 @@
-from knot_resolver_manager.utils import contains_element_matching, foldl
+from knot_resolver_manager.utils.functional import all_matches, contains_element_matching, foldl
 
 
 def test_foldl():
@@ -13,3 +13,10 @@ def test_containsElementMatching():
 
     assert contains_element_matching(lambda e: e == 5, lst)
     assert not contains_element_matching(lambda e: e == 11, lst)
+
+
+def test_matches_all():
+    lst = list(range(10))
+
+    assert all_matches(lambda x: x >= 0, lst)
+    assert not all_matches(lambda x: x % 2 == 0, lst)