def test_feed_does_not_exceed_max(self):
        for _ in xrange(settings.RSS_NUM_EVENTS_TO_FETCH + 20):
            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 does not have more than RSS_NUM_EVENTS_TO_FETCH events.
        self.assertEquals(len(channel.findall('item')), settings.RSS_NUM_EVENTS_TO_FETCH)
dataset/ETHPy150Open twilio/stashboard/tests/test_rss.py/RSSFeedTest.test_feed_does_not_exceed_max/swapped operands of `in`