def test_list_scopes(self): """ SCOPE (CORE): List scopes """ for scope in self.scopes: add_scope(scope=scope, account=self.jdoe) scopes = get_scopes(account=self.jdoe) for scope in scopes: assert scope in scopes
def test_list_scopes(self): """ SCOPE (CORE): List scopes """ for scope in self.scopes: add_scope(scope=scope, account='jdoe') scopes = get_scopes(account='jdoe') for s in scopes: assert_in(s, scopes)
def get_scopes(account): """ Gets a list of all scopes for an account. :param account: The account name. :returns: A list containing the names of all scopes for this account. """ return core_scope.get_scopes(account)
def get_scopes(account): """ Gets a list of all scopes for an account. :param account: The account name. :returns: A list containing the names of all scopes for this account. """ account = InternalAccount(account) return [scope.external for scope in core_scope.get_scopes(account)]
def get_scopes(account, vo='def', session=None): """ Gets a list of all scopes for an account. :param account: The account name. :param vo: The VO to act on. :param session: The database session in use. :returns: A list containing the names of all scopes for this account. """ account = InternalAccount(account, vo=vo) return [scope.external for scope in core_scope.get_scopes(account, session=session)]