コード例 #1
0
ファイル: test_web.py プロジェクト: madisona/django-web-utils
    def test_pings_google_sitemap_with_sitemap_location(self, urlopen):
        ping_google_sitemap(mock.Mock())

        expected_call = self.settings_dict['GOOGLE_SITEMAP_URL'] + '?sitemap=' + quote_plus(
            self.settings_dict['SITE_DOMAIN'] + reverse("sitemap")
        )
        urlopen.assert_called_once_with(expected_call)
コード例 #2
0
ファイル: tests.py プロジェクト: pombredanne/django-web-utils
    def test_doesnt_pings_google_sitemap(self, urlopen):
        settings.PING_GOOGLE_SITEMAP = False
        ping_google_sitemap(mock.Mock())

        self.assertFalse(urlopen.called)