Example #1
0
def test_institution_search_requires_q_or_id():
    client = Client('test_id', 'test_secret')
    with pytest.raises(AssertionError):
        client.institution_search(p='auth')
Example #2
0
def test_institution_search_without_product():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells')
    assert response.status_code == 200
Example #3
0
def test_institution_search_with_bad_id():
    client = Client('test_id', 'test_secret')
    response = client.institution_search(institution_id='bad')
    assert response.status_code == 200
    assert len(to_json(response)) == 0
Example #4
0
def test_institution_search_with_multi_tokens():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells fargo', 'auth')
    assert response.status_code == 200
    assert to_json(response)[0]['name'] == 'Wells Fargo'
Example #5
0
def test_institution_search_with_bad_product():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells fargo', 'bad')
    assert response.status_code == 200
    assert len(to_json(response)) == 0
Example #6
0
def test_institution_search_requires_q_or_id():
    client = Client('test_id', 'test_secret')
    with pytest.raises(AssertionError):
        client.institution_search(p='auth')
Example #7
0
def test_institution_search():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells', 'auth')
    assert response.status_code == 200
Example #8
0
def test_institution_search_with_bad_id():
    client = Client('test_id', 'test_secret')
    response = client.institution_search(institution_id='bad')
    assert response.status_code == 200
    assert len(to_json(response)) == 0
Example #9
0
def test_institution_search_without_product():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells')
    assert response.status_code == 200
Example #10
0
def test_institution_search_with_bad_product():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells fargo', 'bad')
    assert response.status_code == 200
    assert len(to_json(response)) == 0
Example #11
0
def test_institution_search_with_multi_tokens():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells fargo', 'auth')
    assert response.status_code == 200
    assert to_json(response)[0]['name'] == 'Wells Fargo'
Example #12
0
def test_institution_search():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells', 'auth')
    assert response.status_code == 200