コード例 #1
0
    def test_setFilterString(self):
        datasearch = DataSearch("Test")
        filterString = 'foo bar'
        datasearch.setFilterString(filterString)
        assert datasearch.filterString() == filterString

        filterString = ' foo bar '
        datasearch.setFilterString(filterString)
        assert datasearch.filterString() != filterString
        assert datasearch.filterString() == filterString.strip()
コード例 #2
0
 def test_filterString(self):
     datasearch = DataSearch("Test")
     assert datasearch.filterString() == ''
     datasearch = DataSearch('Test2', filterString='Hello World')
     assert datasearch.filterString() == 'Hello World'