def test_feed_with_events(self):
        event = models.Event(start=datetime.datetime.now(), message="test hello",
                                service=random.choice(self.services),
                                status=random.choice(self.statuses))
        event.put()
        response = self.get("/rss")
        self.assertTrue(response.headers["Content-Type"] in "application/rss+xml")
        self.assertEquals(response.status_code, 200)

        result = xml.etree.ElementTree.fromstring(response.content)
        self.assertEquals(len(result), 1)
        self.assertEquals(result[0].tag, 'channel')
        channel = result[0]

        # assert that response has 1 event.
        self.assertEquals(len(channel.findall('item')), 1)

        # assert existence of title, description, and link elements in channel.
        for tag in ['title', 'description', 'link']:
            self.assertEquals(len(channel.findall(tag)), 1)

        item = channel.find('item')
        # assert existence of title, description, link, category, pubDate, and guid
        # elements in channel.
        for tag in ['title', 'description', 'link', 'category', 'pubDate', 'guid']:
            self.assertEquals(len(item.findall(tag)), 1)
dataset/ETHPy150Open twilio/stashboard/tests/test_rss.py/RSSFeedTest.test_feed_with_events/swapped operands of `in`