Beispiel #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')
Beispiel #2
0
def test_institution_search_without_product():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells')
    assert response.status_code == 200
Beispiel #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
Beispiel #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'
Beispiel #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
Beispiel #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')
Beispiel #7
0
def test_institution_search():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells', 'auth')
    assert response.status_code == 200
Beispiel #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
Beispiel #9
0
def test_institution_search_without_product():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells')
    assert response.status_code == 200
Beispiel #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
Beispiel #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'
Beispiel #12
0
def test_institution_search():
    client = Client('test_id', 'test_secret')
    response = client.institution_search('wells', 'auth')
    assert response.status_code == 200