def test_purchase_quote_success(): client = AcmeClient() client.login(user, pwd) res1 = client.create_quote(test_request) quote_number = res1['quote_number'] res2 = client.purchase_quote(quote_number) assert 'policy_number' in res2
def test_purchase_quote_fails_no_auth(): client = AcmeClient() with pytest.raises(ClientUnauthorizedException): client.purchase_quote(1)