def test_path_query_path4_retrieves_expected_subset(): set_default_paper_matrix() nodes = matrix_searcher.path_query(4) assert 3 == len(nodes) assert paper_nodes[3] in nodes assert paper_nodes[6] in nodes assert paper_nodes[7] in nodes
def test_node_query_pub1_retrieves_expected_subset(): set_default_paper_matrix() paths = matrix_searcher.node_query(3) assert 5 == len(paths) assert paper_paths[0] in paths assert paper_paths[2] in paths assert paper_paths[4] in paths assert paper_paths[5] in paths assert paper_paths[6] in paths
def test_pub1_selected(): set_default_paper_matrix() response = HTTPClient().fetch(url('pub1')) assert 200 == response.code assert api_content_type == response.headers['content-type'] assert paper_nodes[3] == json.loads(response.body)['selected_node']
def test_final_node_query_pub1_retrieves_expected_subset(): set_default_paper_matrix() paths = matrix_searcher.final_node_query(3) assert 0 == len(paths)
def test_final_node_query_researcher_retrieves_expected_subset(): set_default_paper_matrix() paths = matrix_searcher.final_node_query(2) assert 2 == len(paths) assert paper_paths[6] in paths assert paper_paths[9] in paths