Skip to content

Commit

Permalink
update test_get_rev_profile()
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyaGomaa committed Jan 27, 2024
1 parent 933fe5b commit 8dc7a94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion slips_files/core/database/redis_db/profile_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tests/test_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 8dc7a94

Please sign in to comment.