def test_cancelled_event(self): ss_pista = ps_data.get_ps_event_by_slug('substandards-pista') assert ss_pista.cancelled is False ss_parklife = ps_data.get_ps_event_by_slug('substandards-parklife') assert ss_parklife.cancelled is True
def test_substandards_slug_with_hyphens(self): first_ss = ps_data.get_ps_event_by_slug('mid-pub-standards-non-pub-standards-pub-standards') self.assertStartsAt(first_ss, utc_datetime(2006, 9, 25, 17, 0))
def test_manual_ps_slugs(self): ps_65 = ps_data.get_ps_event_by_slug('pubstandards-lxv') self.assertStartsAt(ps_65, utc_datetime(2005, 12, 14, 18, 0)) ps_100 = ps_data.get_ps_event_by_slug('pubstandards-c') self.assertStartsAt(ps_100, utc_datetime(2014, 3, 13, 18, 0))
def other_event(slug): event = ps_data.get_ps_event_by_slug(slug) if not event: return "Unknown event", 404 return flask.render_template('event.html', event=event)
def test_substandards_slug(self): ss_pista = ps_data.get_ps_event_by_slug('substandards-pista') self.assertStartsAt(ss_pista, utc_datetime(2007, 2, 1, 18, 0)) assert ps_data.get_ps_event_by_slug('substandards-Pista') is None, 'Invalid slug matched'
def test_substandards_slug_with_hyphens(self): first_ss = ps_data.get_ps_event_by_slug( 'mid-pub-standards-non-pub-standards-pub-standards') self.assertStartsAt(first_ss, utc_datetime(2006, 9, 25, 17, 0))
def test_substandards_slug(self): ss_pista = ps_data.get_ps_event_by_slug('substandards-pista') self.assertStartsAt(ss_pista, utc_datetime(2007, 2, 1, 18, 0)) assert ps_data.get_ps_event_by_slug( 'substandards-Pista') is None, 'Invalid slug matched'