Skip to content

Commit

Permalink
rework deduplication tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Oct 10, 2023
1 parent 4483791 commit bfa65f6
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 211 deletions.
4 changes: 4 additions & 0 deletions bbot/modules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,10 @@ def _incoming_dedup_hash(self, event):
"""
Determines the criteria for what is considered to be a duplicate event if `accept_dupes` is False.
"""
if self.per_host_only:
return self.get_per_host_hash(event)
elif self.per_domain_only:
return self.get_per_domain_hash(event)
return hash(event)

def _outgoing_dedup_hash(self, event):
Expand Down
2 changes: 1 addition & 1 deletion bbot/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def pytest_sessionfinish(session, exitstatus):
logger.removeHandler(handler)

# Wipe out BBOT home dir
shutil.rmtree("/tmp/.bbot_test", ignore_errors=True)
# shutil.rmtree("/tmp/.bbot_test", ignore_errors=True)

yield

Expand Down
210 changes: 0 additions & 210 deletions bbot/test/test_step_1/test_manager.py

This file was deleted.

Loading

0 comments on commit bfa65f6

Please sign in to comment.