Ejemplo n.º 1
0
def test_search_by_country():
    results = search('Syria')

    expected_results = [{
        "city": "Alma",
        "name": "Tasha Barker",
        "country": "Syria",
        "company": "Augue LLC",
        "job_history": [
            ""
        ],
        "email": "*****@*****.**"
    }]
    assert sorted(expected_results) == sorted(results)
Ejemplo n.º 2
0
def test_search():
    results = search('Madeson Hopkins')

    expected_results = [{
        'city': 'Osgoode',
        'name': 'Madeson Hopkins',
        'country': 'Tokelau',
        'company': 'Vitae Erat LLC',
        'job_history': [
            'Chami'
        ],
        'email': '*****@*****.**'
    }]

    assert sorted(expected_results) == sorted(results)
Ejemplo n.º 3
0
def test_search_by_job_history_name():
    results = search('Garrison Wolf, Microsoft')

    expected_results = [{
        "city": "Baunatal",
        "name": "Garrison Wolf",
        "country": "Uganda",
        "company": "Et Malesuada Fames Incorporated",
        "job_history": [
            "Cakewalk",
            "Microsoft"
        ],
        "email": "*****@*****.**"
    }]
    assert sorted(expected_results) == sorted(results)
Ejemplo n.º 4
0
def test_search_job_no_terms_no_results():
    results = search(None)

    expected_results = []
    assert sorted(expected_results) == sorted(results)
Ejemplo n.º 5
0
def test_search_job_history_list_no_results():
    results = search('Garrison Wolf, The NSA')

    expected_results = []
    assert sorted(expected_results) == sorted(results)