@@ -0,0 +1,1012 @@
+import os%0Aimport app%0Aimport parseagenda%0Aimport unittest%0Aimport tempfile%0A%0Aclass EventsTestCase(unittest.TestCase):%0A%0A    def setUp(self):%0A        app.app.config%5B'TESTING'%5D = True%0A        self.app = app.app.test_client()%0A        self.rss_url = %22http://www.agendadulibre.org/rss.php?tag=toulibre%22%0A%0A%0A    # Testing pages%0A    def test_get_homepage(self):%0A        homepage = self.app.get('/')%0A        assert '%3Ch1%3EAgenda du Libre%3C/h1%3E' in homepage.data%0A%0A%0A    # Testing functions%0A    def test_get_events_from_rss(self):%0A        events = parseagenda.Events()%0A        results = events.get_events_from_rss(self.rss_url)%0A        self.assertTrue(len(results) %3E 0)%0A        self.assertTrue(events.title)%0A        self.assertEqual(results%5B0%5D%5B'location'%5D, u'Toulouse')%0A        self.assertEqual(results%5B0%5D%5B'title'%5D, u'Rencontre Logiciels Libres')%0A        self.assertTrue(results%5B0%5D%5B'date'%5D)%0A        self.assertTrue(results%5B0%5D%5B'summary'%5D)%0A        self.assertTrue(results%5B0%5D%5B'content'%5D)%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A

Add tests