예제 #1
0
def test_event_filter(httpserver):
	httpserver.serve_content(open('tests/stubs/events.json').read())
	events = izsha.filter_events(izsha.fetch_events(httpserver.url, game.start_time, game.players), game)
	assert len(events) == 1
예제 #2
0
def test_event_api(httpserver):
	httpserver.serve_content(open('tests/stubs/events.json').read())
	events = izsha.fetch_events(httpserver.url, game.start_time, game.players)
	assert len(events) == 5
	assert events[0].title == "WCS Korea Premier League Ro32 Group C"
	assert events[0].teams[0] == "sOs"