Skip to content

Commit

Permalink
Update test_api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Oct 30, 2024
1 parent ae2b507 commit 9c4daf0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ def test_sort(self):
]
self.assertEqual(expected, sorted(start))

def test_set_membership(self):
"""Test membership in sets."""
collection = {
Reference.from_curie("def:1234"),
Reference.from_curie("abc:1234"),
Reference.from_curie("abc:1235"),
}
self.assertIn(Reference.from_curie("def:1234"), collection)
self.assertNotIn(Reference.from_curie("xyz:1234"), collection)
self.assertNotIn(Reference.from_curie(":1234"), collection)
self.assertNotIn(Reference.from_curie("abc:"), collection)


class TestAddRecord(unittest.TestCase):
"""Test adding records."""
Expand Down

0 comments on commit 9c4daf0

Please sign in to comment.