'Test URLs are prefixed with https:// when feed is requested over HTTPS.'

def test_secure_urls(self):

    response = self.client.get(u'/syndication/rss2/', **{u'wsgi.url_scheme': u'https'})
    doc = minidom.parseString(response.content)
    chan = doc.getElementsByTagName(u'channel')[0]
    self.assertEqual(chan.getElementsByTagName(u'link')[0].firstChild.wholeText[0:5], u'https')
    atom_link = chan.getElementsByTagName(u'atom:link')[0]
    self.assertEqual(atom_link.getAttribute(u'href')[0:5], u'https')
    for link in doc.getElementsByTagName(u'link'):
        if (link.getAttribute(u'rel') == u'self'):
            self.assertEqual(link.getAttribute(u'href')[0:5], u'https')
