def test_filter_result_by_manifest_error(): input_json = [{ "testcase": "1.html", "domComplete": 1460358389000, }] manifest = ["1.html", "2.html"] with pytest.raises(Exception) as execinfo: runner.filter_result_by_manifest(input_json, manifest) assert "Missing test result" in str(execinfo.value)
def test_filter_result_by_manifest_error(): input_json = [{ "testcase": "1.html", "domComplete": 1460358389000, }] manifest = [ "1.html", "2.html" ] with pytest.raises(Exception) as execinfo: runner.filter_result_by_manifest(input_json, manifest) assert "Missing test result" in str(execinfo.value)
def test_filter_result_by_manifest(): input_json = [{ "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/content.html", "domComplete": 1460358389000, }, { "testcase": "non-existing-html", "domComplete": 1460358389000, }, { "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", "domComplete": 1460358389000, }] expected = [{ "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", "domComplete": 1460358389000, }] manifest = [ "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", ] assert (expected == runner.filter_result_by_manifest(input_json, manifest))
def test_filter_result_by_manifest(): input_json = [{ "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/content.html", "domComplete": 1460358389000, }, { "testcase": "non-existing-html", "domComplete": 1460358389000, }, { "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", "domComplete": 1460358389000, }] expected = [{ "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", "domComplete": 1460358389000, }] manifest = [ "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", ] assert(expected == runner.filter_result_by_manifest(input_json, manifest))