class TestWithinTextValidator(unittest.TestCase):
    def setUp(self):
        self.validator = WithinTextValidator()
        
    def test_validate(self):
        result = self.validator.validate('apple', 'I like apples')
        self.failUnless(result)
        
        result = self.validator.validate('apple', 'I am a PC')
        self.failIf(result)
class TestWithinTextValidator(unittest.TestCase):
    def setUp(self):
        self.validator = WithinTextValidator()

    def test_validate(self):
        result = self.validator.validate('apple', 'I like apples')
        self.failUnless(result)

        result = self.validator.validate('apple', 'I am a PC')
        self.failIf(result)
 def setUp(self):
     self.validator = WithinTextValidator()
 def setUp(self):
     self.validator = WithinTextValidator()