diff --git a/slips_files/core/database/redis_db/profile_handler.py b/slips_files/core/database/redis_db/profile_handler.py index 035ced8e1..acec6bbf5 100644 --- a/slips_files/core/database/redis_db/profile_handler.py +++ b/slips_files/core/database/redis_db/profile_handler.py @@ -114,7 +114,6 @@ def get_timewindow(self, flowtime, profileid): tw_start: float = starttime_of_first_tw + ( self.width * (tw_number-1) ) - else: # this is the first timewindow tw_number: int = 1 diff --git a/tests/test_profiler.py b/tests/test_profiler.py index d768ea385..b41b15fc2 100644 --- a/tests/test_profiler.py +++ b/tests/test_profiler.py @@ -204,7 +204,8 @@ def test_get_rev_profile(mock_rdb): 'Established','' ) profiler.daddr_as_obj = ipaddress.ip_address(profiler.flow.daddr) - mock_rdb.getProfileIdFromIP.return_value = None + mock_rdb.getProfileIdFromIP.return_value = None + mock_rdb.r.hget('analysis', 'file_start').return_value = 0 assert profiler.get_rev_profile() == ('profile_8.8.8.8', 'timewindow1') def test_get_rev_profile_no_daddr(flow):