예제 #1
0
    def test_warns_bad_type(self, item):
        with patch("tavern.util.dict_util.logger.warning") as wmock:
            _check_and_format_values("{fd}", {"fd": item})

        assert wmock.called_with(
            "Formatting 'fd' will result in it being coerced to a string (it is a {})"
            .format(type(item)))
예제 #2
0
    def test_no_warn_good_type(self, item):
        with patch("tavern.util.dict_util.logger.warning") as wmock:
            _check_and_format_values("{fd}", {"fd": item})

        assert not wmock.called