def test002RetrieveUserRaisesException(self):
    """Tests if RetrieveUser() raises AppsForYourDomainException with
    appropriate error code"""

    try:
      non_existance = self.apps_client.RetrieveUser('nobody-' + self.postfix)
    except gdata.apps.service.AppsForYourDomainException, e:
      self.assertEquals(e.error_code, gdata.apps.service.ENTITY_DOES_NOT_EXIST)
    except Exception, e:
      self.fail('Unexpected exception occurred: %s' % e)
    else:
      self.fail('No exception occurred')
dataset/ETHPy150Open kuri65536/python-for-android/python-build/python-libs/gdata/tests/gdata_tests/apps/service_test.py/AppsServiceUnitTest01.test002RetrieveUserRaisesException/original