def test_refresh(self, vector_client): attributes = dict(name='name', title='title', description='description', owners=['owners'], readers=['readers'], writers=None) vector_client.get_product.side_effect = lambda id: DotDict(data=dict(id=id, attributes=attributes)) fc = FeatureCollection('foo', vector_client=vector_client) fc.refresh() for key in attributes.keys(): self.assertEqual(getattr(fc, key), attributes[key])
def test_refresh(self, vector_client): attributes = dict( name="name", title="title", description="description", owners=["owners"], readers=["readers"], writers=None, ) vector_client.get_product.side_effect = lambda id: DotDict(data=dict( id=id, attributes=attributes)) fc = FeatureCollection("foo", vector_client=vector_client) fc.refresh() for key in attributes.keys(): assert getattr(fc, key) == attributes[key]