def test_init_without_collection(self): with open(self.filename) as f: data = json.loads(f.read()) with open(self.filename.replace('item.json', 'catalog.json')) as f: coldata = json.loads(f.read()) item = Item(data) assert (item.id == data['id']) assert (item.collection() is None)
def test_init_without_collection(self): with open(self.filename) as f: data = json.loads(f.read()) with open(self.filename.replace('item.json', 'catalog.json')) as f: coldata = json.loads(f.read()) item = Item(data) assert(item.id == data['id']) assert(item.collection() is None) assert(item.eobands == []) # now put collection properties here data['properties'].update(coldata['properties']) item = Item(data) assert(len(item.eobands) == 11)