def test_remove_service_account_raise_GoogleAPI_exc(cloud_manager, db_session, setup_data): """ Test that raiseis an exception due to Google API errors """ (cloud_manager.return_value.__enter__.return_value. remove_member_from_group.side_effect) = CirrusError("exception") with pytest.raises(CirrusError): assert force_remove_service_account_from_access( "*****@*****.**", "test")
def test_update_user_service_account_raise_GoogleAPI_exc( cloud_manager, db_session, setup_data): """ Test that raises an exception due to Google API errors during removing members from google groups """ (cloud_manager.return_value.__enter__.return_value. remove_member_from_group.side_effect) = CirrusError("exception") with pytest.raises(CirrusError): assert patch_user_service_account("test", "*****@*****.**", ["test_auth_2"])