From 91ce9f19bb168e77b0e406ae8d6dfd92cd27e198 Mon Sep 17 00:00:00 2001 From: Simon Kassel Date: Tue, 9 Jun 2020 11:55:15 -0400 Subject: [PATCH] test bug fix --- tests/test_item.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_item.py b/tests/test_item.py index 730062234..de52eb66e 100644 --- a/tests/test_item.py +++ b/tests/test_item.py @@ -50,3 +50,12 @@ def test_read_eo_item_owns_asset(self): assert len(item.assets) > 0 for asset_key in item.assets: self.assertEqual(item.assets[asset_key].owner, item) + + def test_self_contained_item(self): + m = TestCases.get_path('data-files/itemcollections/sample-item-collection.json') + with open(m) as f: + item_dict = json.load(f)['features'][0] + item_dict['links'] = [l for l in item_dict['links'] if l['rel'] == 'self'] + item = Item.from_dict(item_dict) + self.assertIsInstance(item, Item) + self.assertEqual(len(item.links), 1) \ No newline at end of file