def test_get(config): """Testing query for a specific object""" p = PostgreSQLProvider(config) results = p.get(29701937) print(results) assert len(results['features']) == 1 assert "Kanyosha" in results['features'][0]['properties']['name']
def test_get(config): """Testing query for a specific object""" p = PostgreSQLProvider(config) result = p.get(29701937) assert isinstance(result, dict) assert 'geometry' in result assert 'properties' in result assert 'id' in result assert 'Kanyosha' in result['properties']['name']
def test_get_not_existing_item_raise_exception(config): """Testing query for a not existing object""" p = PostgreSQLProvider(config) with pytest.raises(ProviderItemNotFoundError): p.get(-1)