コード例 #1
0
ファイル: test_strutils.py プロジェクト: toconn/Python3-Core
 def test_contains_no_match(self):
     
     result = strutils.contains('ABC123', 'match')
     self.assertFalse(result)
コード例 #2
0
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)
コード例 #3
0
ファイル: test_strutils.py プロジェクト: toconn/Python3-Core
 def test_contains_match(self):
     
     result = strutils.contains('ABCmatch123', 'match')
     self.assertTrue(result)
コード例 #4
0
ファイル: test_strutils.py プロジェクト: toconn/Python3-Core
 def test_contains_none(self):
     
     result = strutils.contains(None, 'match')
     self.assertFalse(result)
コード例 #5
0
    def test_contains_no_match(self):

        result = strutils.contains('ABC123', 'match')
        self.assertFalse(result)
コード例 #6
0
    def test_contains_match(self):

        result = strutils.contains('ABCmatch123', 'match')
        self.assertTrue(result)
コード例 #7
0
    def test_contains_none(self):

        result = strutils.contains(None, 'match')
        self.assertFalse(result)