def test_linkify_bounce_url_callback(mock_get_outgoing_url): mock_get_outgoing_url.return_value = 'bar' res = urlresolvers.linkify_bounce_url_callback({'href': 'foo'}) # Make sure get_outgoing_url was called. eq_(res, {'href': 'bar'}) mock_get_outgoing_url.assert_called_with('foo')
def test_linkify_bounce_url_callback(mock_get_outgoing_url): mock_get_outgoing_url.return_value = 'bar' res = urlresolvers.linkify_bounce_url_callback({'href': 'foo'}) # Make sure get_outgoing_url was called. eq_(res, {'href': 'bar'}) mock_get_outgoing_url.assert_called_with('foo')
def test_linkify_bounce_url_callback(mock_get_outgoing_url): mock_get_outgoing_url.return_value = "bar" res = urlresolvers.linkify_bounce_url_callback({"href": "foo"}) # Make sure get_outgoing_url was called. eq_(res, {"href": "bar"}) mock_get_outgoing_url.assert_called_with("foo")