def test_contains_no_match(self): result = strutils.contains('ABC123', 'match') self.assertFalse(result)
def containsText(field_name, match_text): ''' A condition checker that checks the object field name contains match_value in it. ''' return lambda test_object: strutils.contains( getattr(test_object, field_name), match_text)
def test_contains_match(self): result = strutils.contains('ABCmatch123', 'match') self.assertTrue(result)
def test_contains_none(self): result = strutils.contains(None, 'match') self.assertFalse(result)