Skip to content

Commit

Permalink
removing deprecated test
Browse files Browse the repository at this point in the history
  • Loading branch information
John Waller committed May 2, 2024
1 parent 9074fe0 commit d49352e
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 60 deletions.
23 changes: 12 additions & 11 deletions test/test-occurrences-download_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,18 @@ def test_alternative_main_type(self):
}
)

def test_add_predicate(self):
"""test the predicate addition"""
req = GbifDownload("name", "email")
req.add_predicate("COUNTRY", "BE", "equals")
self.assertIsInstance(req.payload["predicate"]["predicates"], list)
self.assertEqual(len(req.payload["predicate"]["predicates"]), 1)
self.assertIsInstance(req.payload["predicate"]["predicates"][0], dict)
self.assertDictEqual(
req.payload["predicate"]["predicates"][0],
{"key": "COUNTRY", "type": "equals", "value": "BE"},
)
# deprecated method - to be removed
# def test_add_predicate(self):
# """test the predicate addition"""
# req = GbifDownload("name", "email")
# req.add_predicate("COUNTRY", "BE", "equals")
# self.assertIsInstance(req.payload["predicate"]["predicates"], list)
# self.assertEqual(len(req.payload["predicate"]["predicates"]), 1)
# self.assertIsInstance(req.payload["predicate"]["predicates"][0], dict)
# self.assertDictEqual(
# req.payload["predicate"]["predicates"][0],
# {"key": "COUNTRY", "type": "equals", "value": "BE"},
# )

def test_add_iterative_predicate(self):
"""the the predicate addition of an iterative sequence"""
Expand Down
2 changes: 1 addition & 1 deletion test/test-registry-networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_networks():
res = registry.networks()
assert dict == res.__class__
assert 2 == len(res)
assert 12 == len(res["data"])
assert 13 == len(res["data"])
assert ["data", "meta"] == sorted(res.keys())


Expand Down
Loading

0 comments on commit d49352e

Please sign in to comment.