Skip to content

Added test cases to test_config.py file to load toml config with the …#22

Open
anuja1906 wants to merge 1 commit intolntdev:anujafrom
anuja1906:collaborate
Open

Added test cases to test_config.py file to load toml config with the …#22
anuja1906 wants to merge 1 commit intolntdev:anujafrom
anuja1906:collaborate

Conversation

@anuja1906
Copy link
Copy Markdown
Collaborator

…non existing filename.Also added test cases to merger the

three different configuration into one.Added test case to test_rest_api.py file to load the rest api config.

Signed-off-by: anuja parate anujax.parate@intel.com

…non existing filename.Also added test cases to merger the

three different configuration into one.Added test case to test_rest_api.py file to load the rest api config.

Signed-off-by: anuja parate <anujax.parate@intel.com>
finally:
os.environ.clear()
os.environ.update(orig_environ)
shutil.rmtree(directory)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be one blank line before every new method definition.

def test_rest_api_config_load_merge(self):
'''Tests the "merge_rest_api_config(configs)" function.
Given a list of PathConfig objects, merges them into
a single PathConfig,giving priority in the order of
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a space after the comma

'opentsdb_db = "http://data_base:0000"',
'opentsdb_username = "name"', 'opentsdb_password = "secret"']
default_dict = OrderedDict([
('bind', "test:1234"),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@askmish is this the correct depth of indentation?

('opentsdb_username', "name"),
('opentsdb_password', "secret")]
)
first_config = RestApiConfig(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to add blank lines to the code where it makes sense, so that the code becomes more readable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants