Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 198a75d

Browse files
committed
Changed instance name.
1 parent e7e77b8 commit 198a75d

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

tests/test_20_config.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os
2+
from typing import Any
23
from typing import Dict
34
from typing import List
45
from typing import Optional
5-
from typing import Any
66

77
import pytest
88

@@ -49,14 +49,16 @@ def __init__(self,
4949

5050

5151
def test_server_config():
52-
c = create_from_config_file(Configuration,
53-
entity_conf=[{"class": EntityConfiguration, "attr": "entity"}],
54-
filename=os.path.join(_dirname, 'server_conf.json'),
55-
base_path=_dirname)
56-
assert c
57-
assert set(c.web_conf.keys()) == {'port', 'domain', 'server_cert', 'server_key', 'debug'}
58-
59-
entity_config = c.entity
52+
configuration = create_from_config_file(Configuration,
53+
entity_conf=[
54+
{"class": EntityConfiguration, "attr": "entity"}],
55+
filename=os.path.join(_dirname, 'server_conf.json'),
56+
base_path=_dirname)
57+
assert configuration
58+
assert set(configuration.web_conf.keys()) == {'port', 'domain', 'server_cert', 'server_key',
59+
'debug'}
60+
61+
entity_config = configuration.entity
6062
assert entity_config.base_url == "https://127.0.0.1:8090"
6163
assert entity_config.httpc_params == {"verify": False}
6264

@@ -74,4 +76,3 @@ def test_entity_config(filename):
7476
ni = dict(configuration.items())
7577
assert len(ni) == 4
7678
assert set(ni.keys()) == {'keys', 'base_url', 'httpc_params', 'hash_seed'}
77-

0 commit comments

Comments
 (0)