

def testTriggersSearchConditions(self):
    t = triggers.Triggers()
    t.Add('GoodAI', target_1)
    t.Add('BadAI', target_2)
    self.assertEqual([], t.Search(artifact='GoodAI', os_name='TermOS', label='t1000'))
    self.assertEqual([good_ai], [c.attr for c in t.Search(artifact='GoodAI')])
    self.assertItemsEqual([t800, t1000], [c.attr for c in t.Search(artifact='BadAI')])

dataset/ETHPy150Open google/grr/grr/lib/checks/triggers_test.py TriggersTest.testTriggersSearchConditions/original