def test_never(self): with pytest.raises(heartbeat.FlicNotFoundError): with open('./sample_darkstat_html/never.html', 'r') as html_file: html = html_file.read() heartbeat.parse_darkstat_html_lines(html.splitlines())
def test_seconds(self): with open('./sample_darkstat_html/59_secs.html', 'r') as html_file: html = html_file.read() assert heartbeat.parse_darkstat_html_lines(html.splitlines()) == 59
def test_empty_html(self): with pytest.raises(heartbeat.FlicNotFoundError): heartbeat.parse_darkstat_html_lines(['', '', ''])