def test_user_ip_address(self):
    event = self.get_event()
    rule = self.get_rule(data={'match': MatchType.EQUAL, 'attribute': 'user.ip_address', 'value': '127.0.0.1'})
    self.assertPasses(rule, event)
    rule = self.get_rule(data={'match': MatchType.EQUAL, 'attribute': 'user.ip_address', 'value': '2'})
    self.assertDoesNotPass(rule, event)
def test_user_ip_address(self):
    event = self.get_event()
    rule = self.get_rule(data={'match': MatchType.EQUAL, 'attribute': 'user.ip_address', 'value': '127.0.0.1'})
    self.assertPasses(rule, event)
    rule = self.get_rule(data={'match': MatchType.EQUAL, 'attribute': 'user.ip_address', 'value': '2'})
    self.assertDoesNotPass(rule, event)