예제 #1
0
    def test_non_decorator_empty_string(self):
        with raises(AssertionError) as exc:
            decorators.not_empty("")
        exc_msg = str(exc.value)

        assert 'is empty' in exc_msg
예제 #2
0
    def test_non_decorator_empty_string(self):
        with raises(AssertionError) as exc:
            decorators.not_empty("")
        exc_msg = str(exc.value)

        assert 'is empty' in exc_msg
예제 #3
0
 def test_not_of_any_valid_types(self):
     with raises(AssertionError) as exc:
         decorators.not_empty(False)
     errors = exc.value.args[0]
     assert 'not of any valid types' in errors
예제 #4
0
 def test_not_of_any_valid_types(self):
     with raises(AssertionError) as exc:
         decorators.not_empty(False)
     errors = exc.value.args[0]
     assert 'not of any valid types' in errors