def test_print_leaflet_webinar(self): leaflet = Leaflet('Webinar', ['Vince', 'Chris', 'Leo'], ['\U0001F4DA', '\U0001F4BB', '\U0001F3AF']) leaflet.set_date(29, 1, 2020) handbill = ("""******************** * * * 'Webinar' * * * * January 29, 2020 * * * * Vince 📚 * * Chris 💻 * * Leo 🎯 * * * ********************""") self.assertEqual(leaflet.print_leaflet(), handbill, msg="Expected a leaflet for Webinar " "with a complete date, with three artists and icons.")
def test_print_leaflet_concert(self): leaflet = Leaflet('Concert', ['John', 'Benjamin', 'Max'], ['\U0001F3B8', '\U0001F3A4', '\U0001F3B9']) leaflet.set_date(30, 4) handbill = ("""******************** * * * 'Concert' * * * * April 30 * * * * John 🎸 * * Benjamin 🎤 * * Max 🎹 * * * ********************""") self.assertEqual(leaflet.print_leaflet(), handbill, msg="Expected a leaflet for Concert " "with a partial date, three artists and three icons.")
def test_leaflet_date_day_month_year(self): leaflet = Leaflet('Event', [], []) leaflet.set_date(21, 2, 2021) self.assertEqual(leaflet.date, 'February 21, 2021', msg="Expected 'February 21, 2021' for date.")
def test_leaflet_date_day_month(self): leaflet = Leaflet('Event', [], []) leaflet.set_date(15, 12) self.assertEqual(leaflet.date, 'December 15', msg="Expected 'December 15' for date.")