Exemplo n.º 1
0
 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")
Exemplo n.º 2
0
 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')
Exemplo n.º 3
0
 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")