コード例 #1
0
def test_data_for_date_filter():
    production_code.create_table_cache_for_job_locations(cursor)
    all_jobs = production_code.grab_all_jobs_for_lat_long(cursor)
    production_code.geo_lat_and_long_for_location(cursor, all_jobs)
    all_jobs = production_code.fetch_all_jobs_with_lat_long(cursor, production_code.fetch_all_jobs(cursor))
    filtered_jobs = production_code.filter_jobs_by_desc("4", all_jobs)
    assert len(filtered_jobs) > 0
コード例 #2
0
def test_data_for_more_details():
    production_code.create_table_cache_for_job_locations(cursor)
    all_jobs = production_code.grab_all_jobs_for_lat_long(cursor)
    production_code.geo_lat_and_long_for_location(cursor, all_jobs)
    all_jobs = production_code.fetch_all_jobs_with_lat_long(cursor, production_code.fetch_all_jobs(cursor))
    graph_data = {'points': [{'curveNumber': 0, 'pointNumber': 548, 'pointIndex': 548, 'lon': '-95.9383758',
                              'lat': '41.2587459',
                              'text': 'CSG Actuarial, Front-End/UI Engineer at CSG Actuarial (Omaha, NE)'}]}
    detailed_data = production_code.get_graph_point_detail_data(graph_data, all_jobs)
    assert detailed_data['company'] == 'CSG Actuarial'