diff options
author | Hansen, Tony (th1395) <th1395@att.com> | 2020-01-27 22:28:34 +0000 |
---|---|---|
committer | Hansen, Tony (th1395) <th1395@att.com> | 2020-01-31 19:10:12 +0000 |
commit | db08ae5dac684a1155dedfd199ae4e372c82e9df (patch) | |
tree | ad8af5f477614099f32f7d430bbc01a1101d76ce /miss_htbt_service/htbtworker.py | |
parent | c23a966aaa7e9172c42d8439a3a208000d1762dc (diff) |
increase code coverage
Change-Id: I30632d2e34401f8eff6e67b9b3d8abba32e80050
Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Issue-ID: DCAEGEN2-1902
Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Diffstat (limited to 'miss_htbt_service/htbtworker.py')
-rw-r--r-- | miss_htbt_service/htbtworker.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/miss_htbt_service/htbtworker.py b/miss_htbt_service/htbtworker.py index c02f817..db0561f 100644 --- a/miss_htbt_service/htbtworker.py +++ b/miss_htbt_service/htbtworker.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2018 AT&T Intellectual Property, Inc. All rights reserved. +# Copyright 2018-2020 AT&T Intellectual Property, Inc. All rights reserved. # Copyright (c) 2019 Pantheon.tech. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,19 +30,19 @@ from . import get_logger _logger = get_logger.get_logger(__name__) -def read_json_file(i): +def read_json_file(i, prefix="../../tests"): if (i==0): - with open (path.abspath(path.join(__file__, "../../tests/test1.json")), "r") as outfile: + with open (path.abspath(path.join(__file__, f"{prefix}/test1.json")), "r") as outfile: cfg = json.load(outfile) elif (i == 1): - with open (path.abspath(path.join(__file__, "../../tests/test2.json")), "r") as outfile: + with open (path.abspath(path.join(__file__, f"{prefix}/test2.json")), "r") as outfile: cfg = json.load(outfile) elif (i ==2): - with open( path.abspath(path.join(__file__, "../../tests/test3.json")), 'r') as outfile: + with open( path.abspath(path.join(__file__, f"{prefix}/test3.json")), 'r') as outfile: cfg = json.load(outfile) return cfg -def process_msg(jsfile,user_name, password, ip_address, port_num, db_name): +def process_msg(jsfile, user_name, password, ip_address, port_num, db_name): global mr_url i=0 sleep_duration = 20 |