Example #1
0
 def test_groups(self):
     with self.assertRaises(ValidationError):
         validate_re("(Min|Short)", ("component", ))
     validate_re("(?P<component>Min|Short)", ("component", ))
Example #2
0
 def clean_match(self):
     match = self.cleaned_data['match']
     validate_re(match, ('component', 'language'))
     return match
Example #3
0
 def test_syntax(self):
     with self.assertRaises(ValidationError):
         validate_re("(Min|Short")
     validate_re("(Min|Short)")
Example #4
0
 def test_empty(self):
     with self.assertRaises(ValidationError):
         validate_re("(Min|Short|)$", allow_empty=False)
     validate_re("(Min|Short)$", allow_empty=False)
Example #5
0
 def clean_match(self):
     match = self.cleaned_data["match"]
     validate_re(match, ("component", "language"))
     return match
Example #6
0
 def test_groups(self):
     with self.assertRaises(ValidationError):
         validate_re('(Min|Short)', ('component', ))
     validate_re('(?P<component>Min|Short)', ('component', ))
Example #7
0
 def clean_match(self):
     match = self.cleaned_data['match']
     validate_re(match, ('component', 'language'))
     return match