def test_get_quote_success(): client = AcmeClient() client.login(user, pwd) res1 = client.create_quote(test_request) quote_number = res1['quote_number'] res2 = client.get_quote(quote_number) assert 'quote_number' in res2 assert 'effective_date' in res2
def test_get_quote_fails_no_auth(): client = AcmeClient() with pytest.raises(ClientUnauthorizedException): client.get_quote(1)