From be25ac706aebde77865996223e14658d36618248 Mon Sep 17 00:00:00 2001 From: Vijay Venkatesh Kumar Date: Mon, 9 Jan 2023 15:05:56 +0000 Subject: Fix black reported error in rls job Change-Id: I5b3b04214ca2a53a23df170bfbfd25c768dc8ac2 Signed-off-by: Vijay Venkatesh Kumar Issue-ID: DCAEGEN2-3321 Signed-off-by: Vijay Venkatesh Kumar --- tests/test_htbt_vnf_table.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'tests/test_htbt_vnf_table.py') diff --git a/tests/test_htbt_vnf_table.py b/tests/test_htbt_vnf_table.py index 4b6c3f1..e425766 100644 --- a/tests/test_htbt_vnf_table.py +++ b/tests/test_htbt_vnf_table.py @@ -52,39 +52,39 @@ class test_vnf_tables(unittest.TestCase): global ip_address, port_num, user_name, password, db_name, cbs_polling_required, cbs_polling_interval ip_address, port_num, user_name, password, db_name, cbs_polling_required, cbs_polling_interval = hb_properties() - @patch('htbtworker.postgres_db_open') - @patch('misshtbtd.db_table_creation_check', return_value=True) + @patch("htbtworker.postgres_db_open") + @patch("misshtbtd.db_table_creation_check", return_value=True) def test_validate_vnf_table_1(self, mock, mock1): result = verify_DB_creation_1(user_name, password, ip_address, port_num, db_name) self.assertEqual(result, True) - @patch('htbtworker.postgres_db_open') - @patch('misshtbtd.db_table_creation_check', return_value=True) + @patch("htbtworker.postgres_db_open") + @patch("misshtbtd.db_table_creation_check", return_value=True) def test_validate_vnf_table_2(self, mock, mock1): result = verify_DB_creation_2(user_name, password, ip_address, port_num, db_name) self.assertEqual(result, True) - @patch('htbtworker.postgres_db_open') - @patch('misshtbtd.db_table_creation_check', return_value=True) + @patch("htbtworker.postgres_db_open") + @patch("misshtbtd.db_table_creation_check", return_value=True) def test_validate_hb_common(self, mock, mock1): result = verify_DB_creation_hb_common() self.assertEqual(result, True) - - @patch('cbs_polling.poll_cbs') + + @patch("cbs_polling.poll_cbs") def test_cbspolling(self, mock): # Check if no exception thrown verify_cbspolling() - @patch('misshtbtd.fetch_json_file') + @patch("misshtbtd.fetch_json_file") def test_fetch_json_file(self, mock1): - configjsonfile = (os.path.dirname(__file__))+"/test-config.json" + configjsonfile = (os.path.dirname(__file__)) + "/test-config.json" mock1.return_value = configjsonfile - + result = verify_fetch_json_file() _logger.info(result) self.assertEqual(result, True) - @patch('misshtbtd.main') + @patch("misshtbtd.main") def test_misshtbtdmain(self, mock): result = verify_misshtbtdmain() _logger.info(result) @@ -95,14 +95,14 @@ class test_vnf_tables(unittest.TestCase): _logger.info(result) self.assertEqual(result, True) - @patch('misshtbtd.fetch_json_file') - @patch('misshtbtd.read_hb_common') - @patch('db_monitoring.db_monitoring') + @patch("misshtbtd.fetch_json_file") + @patch("misshtbtd.read_hb_common") + @patch("db_monitoring.db_monitoring") def test_dbmonitoring(self, mock1, mock2, mock3): - configjsonfile = (os.path.dirname(__file__))+"/test-config.json" + configjsonfile = (os.path.dirname(__file__)) + "/test-config.json" mock1.return_value = configjsonfile - mock2.return_value = ("1234","RUNNING", "XYZ", 1234) - + mock2.return_value = ("1234", "RUNNING", "XYZ", 1234) + result = verify_dbmonitoring() _logger.info(result) self.assertEqual(result, True) -- cgit 1.2.3-korg