Skip to content

Commit

Permalink
Add a test for list_sites(filter_function=..)
Browse files Browse the repository at this point in the history
  • Loading branch information
sajith committed Oct 16, 2023
1 parent 882218a commit 77eb4e7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/integration/test_fablib.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def test_fablib_list_sites_with_fields(self):
fablib = FablibManager()
fablib.list_sites(fields=["Name", "ConnectX-5 Available", "NVMe Total"])

def test_fablib_list_sites_with_filter_function(self):
fablib = FablibManager()
fablib.list_sites(
filter_function=lambda s: s["ConnectX-5 Available"] > 3
and s["NVMe Available"] <= 10
)


if __name__ == "__main__":
unittest.main()

0 comments on commit 77eb4e7

Please sign in to comment.