예제 #1
0
 def test_not_success_multiple_condition_2(self):
     m = Match(pattern_service_name='production.*', match_user_id=22)
     success, _ = m.check(LineA(None, '2016-01-01 14:32', 'noxy_production', 43))
     self.assertFalse(success)
예제 #2
0
 def test_not_success_pattern_condition(self):
     m = Match(pattern_service_name='production.*')
     success, groups = m.check(LineA(None, '2016-01-01 14:32', 'noxy_production', 22))
     self.assertFalse(success)
예제 #3
0
 def test_success_multiple_condition(self):
     m = Match(pattern_service_name='.*production', match_user_id=22)
     success, _ = m.check(LineA(None, '2016-01-01 14:32', 'noxy_production', 22))
     self.assertTrue(success)
예제 #4
0
 def test_not_success_match_condition(self):
     m = Match(match_user_id=22)
     success, _ = m.check(LineA(None, '2016-01-01 14:32', 'noxy_production', 52))
     self.assertFalse(success)
예제 #5
0
 def test_not_success_multiple_condition_2(self):
     m = Match(pattern_service_name='production.*', match_user_id=22)
     success, _ = m.check(
         LineA(None, '2016-01-01 14:32', 'noxy_production', 43))
     self.assertFalse(success)
예제 #6
0
 def test_success_multiple_condition(self):
     m = Match(pattern_service_name='.*production', match_user_id=22)
     success, _ = m.check(
         LineA(None, '2016-01-01 14:32', 'noxy_production', 22))
     self.assertTrue(success)
예제 #7
0
 def test_not_success_pattern_condition(self):
     m = Match(pattern_service_name='production.*')
     success, groups = m.check(
         LineA(None, '2016-01-01 14:32', 'noxy_production', 22))
     self.assertFalse(success)
예제 #8
0
 def test_not_success_match_condition(self):
     m = Match(match_user_id=22)
     success, _ = m.check(
         LineA(None, '2016-01-01 14:32', 'noxy_production', 52))
     self.assertFalse(success)