Skip to content

Commit

Permalink
test bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
simonkassel committed Jun 9, 2020
1 parent 7bc65a6 commit 91ce9f1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 91ce9f1

Please sign in to comment.