def test_twitter_is_rendered(self, urls_mock): url = 'https://twitter.com/US_Ignite' renderer.render_url(url) urls_mock.get.assert_called_once_with('twitter.com')
def test_unknow_url_is_ignored(self, urls_mock): urls_mock.get.return_value = None url = 'http://us-ignite.org/' result = renderer.render_url(url) urls_mock.get.assert_called_once_with('us-ignite.org') eq_(result, None)
def test_github_is_rendered(self, urls_mock): url = 'https://github.com/mozilla/mozilla-ignite' renderer.render_url(url) urls_mock.get.assert_called_once_with('github.com')