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