def test_atom_feed(self):
        response = self.client.get('/syndication/atom/')
        feed = minidom.parseString(response.content).firstChild

        self.assertEqual(feed.nodeName, 'feed')
        self.assertEqual(feed.getAttribute('xmlns'), 'http://www.w3.org/2005/Atom')
        self.assertChildNodes(
            feed,
            ['title', 'subtitle', 'link', 'id', 'updated', 'entry', 'rights', 'category', 'author']
        )
        for link in feed.getElementsByTagName('link'):
            if link.getAttribute('rel') == 'self':
                self.assertEqual(link.getAttribute('href'), 'http://example.com/syndication/atom/')

        entries = feed.getElementsByTagName('entry')
        self.assertEqual(len(entries), Entry.objects.count())
        for entry in entries:
            self.assertChildNodes(entry, [
                'title',
                'link',
                'id',
                'summary',
                'category',
                'updated',
                'published',
                'rights',
                'author',
            ])
            summary = entry.getElementsByTagName('summary')[0]
            self.assertEqual(summary.getAttribute('type'), 'html')
Request token handler decorator.
dataset/ETHPy150Open django/django/tests/syndication_tests/tests.py/SyndicationFeedTest.test_atom_feed--crossover with--dataset/ETHPy150Open lepture/flask-oauthlib/flask_oauthlib/provider/oauth1.py/OAuth1Provider.request_token_handler