From 17dcafa1d7aa9169c8949caf37ef25dfe50ff2ae Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" <robin.mueller.m@gmail.com> Date: Wed, 16 Sep 2020 21:02:34 +0200 Subject: [PATCH] repaired some unittests --- obsw_tmtc_client.py | 8 +++++++- test/obsw_module_test.py | 3 ++- tmtc_core | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/obsw_tmtc_client.py b/obsw_tmtc_client.py index eb88c13..61fe3e3 100755 --- a/obsw_tmtc_client.py +++ b/obsw_tmtc_client.py @@ -215,8 +215,14 @@ class TmTcHandler: g.G_TMTC_PRINTER = self.tmtc_printer LOGGER.info("Performing module tests") # noinspection PyTypeChecker - suite = unittest.TestLoader().loadTestsFromModule(obsw_pus_service_test) + suite = unittest.TestLoader().loadTestsFromName("TestService17", obsw_pus_service_test) unittest.TextTestRunner(verbosity=2).run(suite) + # noinspection PyTypeChecker + suite = unittest.TestLoader().loadTestsFromName("TestService5", obsw_pus_service_test) + unittest.TextTestRunner(verbosity=2).run(suite) + # noinspection PyTypeChecker + # suite = unittest.TestLoader().loadTestsFromName("TestService2", obsw_pus_service_test) + # unittest.TextTestRunner(verbosity=2).run(suite) else: logging.error("Unknown Mode, Configuration error !") diff --git a/test/obsw_module_test.py b/test/obsw_module_test.py index 38c8797..dc7b1c4 100644 --- a/test/obsw_module_test.py +++ b/test/obsw_module_test.py @@ -241,7 +241,8 @@ class TestService(unittest.TestCase): self.scan_for_respective_tc(current_tm_info) # Here, the desired event Id or RID can be specified elif current_tm_info[TmDictionaryKeys.SERVICE] == 5: - if (current_tm_info[TmDictionaryKeys.EVENT_ID] == 8200 and + # TODO: hardcoded values.. should be in config file + if (current_tm_info[TmDictionaryKeys.EVENT_ID] == 8300 and current_tm_info[TmDictionaryKeys.REPORTER_ID] == 0x51001700): self.event_counter = self.event_counter + 1 elif current_tm_info[TmDictionaryKeys.SERVICE] == 17: diff --git a/tmtc_core b/tmtc_core index 32c95a6..7ebc8d7 160000 --- a/tmtc_core +++ b/tmtc_core @@ -1 +1 @@ -Subproject commit 32c95a68ead007956630c8190166af5075bb6538 +Subproject commit 7ebc8d7467226515056dc5b4345bba0350de8062 -- GitLab