def test_institution_search_requires_q_or_id(): client = Client('test_id', 'test_secret') with pytest.raises(AssertionError): client.institution_search(p='auth')
def test_institution_search_without_product(): client = Client('test_id', 'test_secret') response = client.institution_search('wells') assert response.status_code == 200
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
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'
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
def test_institution_search(): client = Client('test_id', 'test_secret') response = client.institution_search('wells', 'auth') assert response.status_code == 200