Example #1
0
    def test_validate_on_invalid_type(self):
        ts = TextString()
        ts.value = 0

        self.assertRaises(TypeError, ts.validate)
Example #2
0
    def test_validate_on_valid(self):
        ts = TextString()
        ts.value = 'Hello World'

        # Check no exception thrown.
        ts.validate()