- Filter Pamsave files by the active flag lifetime window. - Use Braindance attack-data record IDs instead of scanning history.
22 lines
595 B
Python
22 lines
595 B
Python
import unittest
|
|
|
|
import trailer_private
|
|
|
|
|
|
class AttackDataTests(unittest.TestCase):
|
|
def test_selects_current_unique_record_ids_for_target(self) -> None:
|
|
data = {
|
|
"braindance": {
|
|
"10.80.2.2": [
|
|
{"user": "alice", "record": "new-a"},
|
|
{"user": "bob", "record": "new-b"},
|
|
{"user": "alice", "record": "new-a"},
|
|
]
|
|
}
|
|
}
|
|
self.assertEqual(trailer_private.attack_record_ids(data, "10.80.2.2"), ["new-a", "new-b"])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|