userver: samples/config_service/tests/test_config.py
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
samples/config_service/tests/test_config.py
1# /// [Functional test]
2async def test_config(service_client):
3 response = await service_client.post('/configs/values', json={})
4 assert response.status == 200
5 reply = response.json()
6 assert reply['configs']['USERVER_LOG_REQUEST_HEADERS'] is True
7
8
9async def test_config_specific_ids(service_client):
10 response = await service_client.post(
11 '/configs/values',
12 json={
13 'updated_since': '2021-06-29T14:15:31.173239295+0000',
14 'ids': ['USERVER_TASK_PROCESSOR_QOS'],
15 },
16 )
17 assert response.status == 200
18 reply = response.json()
19 assert len(reply['configs']) == 1
20 assert reply['configs']['USERVER_TASK_PROCESSOR_QOS']
21 # /// [Functional test]