Я пытаюсь как-то выполнить запрос на получение для тестирования flask клиента для Евы:
@pytest.fixture(scope='session')
def client():
app = a.create_app()
app.debug = True
client = app.test_client()
return client
def animal_mes_id(client):
#res = client.get('/my_col?where={"_name": "animal"}')
res = client.get('/my_col', query_string={"_name": "animal"})
print(res.data)
return res.data......['_id'] # Schematic way to show I just want to get the _id
У меня не было возможности ни тем, ни другим в следующих строках
#res = client.get('/my_col?where={"_name": "animal"}')
res = client.get('/my_col', query_string={"_name": "animal"})
передать --data-urlencode 'projection={"_id": 1}'
как есть задокументировано
Я пробовал такие вещи как:
client.get('/my_col?where={"_name": "animal"} --data-urlencode \'projection={"_id": 1}\'')