def test_correct_args(self, MockClass): parser = Mock() token = Mock() token.split_contents = Mock(return_value=("tagname", "url", "lrg", "alt")) do_shrinkthewebimage(parser, token) MockClass.assert_called_with(url="url", stwsize="lrg", alt="alt")
def test_pro_args(self, MockClass): parser = Mock() token = Mock() token.split_contents = Mock(return_value=("tagname", "url", "lrg", 'stwinside = 1', 'stwanotherkey = asfd')) do_shrinkthewebimage(parser, token) MockClass.assert_called_with(url="url", stwsize="lrg", stwinside="1", stwanotherkey='asfd')
def test_correct_args(self, MockClass): parser = Mock() token = Mock() token.split_contents = Mock(return_value=("tagname", "url", "lrg")) do_shrinkthewebimage(parser, token) MockClass.assert_called_with(url="url", stwsize="lrg")