コード例 #1
0
 def setUp(self):
     self.server_url = self.conf_get('main', 'url')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port,
                                             'admin')
     self.cred_member =  xmlrpc_get_credential(self.credential_host,
                                               self.credential_port,
                                               'members')
     self.pglog_file = self.conf_get('main', 'pglog', '')
     self.log_dir = self.conf_get('main', 'log_dir', '')
     if os.path.exists(self.pglog_file) and not self.in_bench_mode:
         self.logd("Checking for PostgreSQL logs")
         self.pglogf = open(self.pglog_file)
         # move to end of file
         self.pglogf.seek(0,2)
     else:
         self.pglog_file = None
     self.monitorctl_file = self.conf_get('main', 'monitorctl_file', '')
     if os.path.exists(self.monitorctl_file) and not self.in_bench_mode:
         self.logd("Using monitorclt.sh")
     else:
         self.monitorctl_file = None
     self.logd("setUp")
コード例 #2
0
ファイル: testcase.py プロジェクト: administration-solrep/EPG
 def setUp(self):
     self.server_url = self.conf_get('main', 'url')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port,
                                             'admin')
     self.cred_member =  xmlrpc_get_credential(self.credential_host,
                                               self.credential_port,
                                               'members')
     self.pglog_file = self.conf_get('main', 'pglog', '')
     self.log_dir = self.conf_get('main', 'log_dir', '')
     if os.path.exists(self.pglog_file) and not self.in_bench_mode:
         self.logd("Checking for PostgreSQL logs")
         self.pglogf = open(self.pglog_file)
         # move to end of file
         self.pglogf.seek(0,2)
     else:
         self.pglog_file = None
     self.monitorctl_file = self.conf_get('main', 'monitorctl_file', '')
     if os.path.exists(self.monitorctl_file) and not self.in_bench_mode:
         self.logd("Using monitorclt.sh")
     else:
         self.monitorctl_file = None
     self.logd("setUp")
コード例 #3
0
    def setUp(self):
        """Setting up test."""
        self.logd("setUp")

        self.manip = ManipEpg.ManipEpg(self)

        self.server_url = self.conf_get('main', 'url')
        self.credential_host = self.conf_get('credential', 'host')
        self.credential_port = self.conf_getInt('credential', 'port')

        self.recherche_pattern_scenario5 = self.conf_get(
            'scenario5', 'recherche_pattern')

        utilisateur_groupe = self.conf_get('scenario1', 'connexion_groupe')
        self.login, self.password = xmlrpc_get_credential(
            self.credential_host, self.credential_port, utilisateur_groupe)

        self.nordistrib_host = self.conf_get('nordistrib', 'host')
        self.nordistrib_port = self.conf_getInt('nordistrib', 'port')
        nors = self.conf_get('scenario1', 'nor_group')
        self.nor_a_valider = xmlrpc_get_credential(self.nordistrib_host,
                                                   self.nordistrib_port,
                                                   nors)[0]

        # document qui sera uploade
        self.documentLocation = self.conf_get('scenario20', 'documentLocation')
        # poste utilisé pour l'ajout d'étape
        self.poste = self.conf_get('scenario21', 'poste')
コード例 #4
0
 def setUp(self):
     self.server_url = self.conf_get('main', 'url')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port, 'admin')
     self.cred_member = xmlrpc_get_credential(self.credential_host,
                                              self.credential_port,
                                              'members')
     self.logd("setUp")
コード例 #5
0
 def setUp(self):
     self.server_url = self.conf_get('main', 'url')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port, 'admin')
     self.dav_url = self.server_url + "/site/dav"
     self.nb_docs = self.conf_getInt('testWriter', 'nb_docs')
     self.cred_member = xmlrpc_get_credential(self.credential_host,
                                              self.credential_port,
                                              'members')
コード例 #6
0
ファイル: test_webengine.py プロジェクト: Contenteco/nuxeo
 def setUp(self):
     self.server_url = self.conf_get('main', 'url')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port,
                                             'admin')
     self.cred_member =  xmlrpc_get_credential(self.credential_host,
                                               self.credential_port,
                                               'members')
     self.logd("setUp")
コード例 #7
0
 def setUp(self):
     """Setting up test."""
     self.logd("setUp")
     self.addHeader('Accept-Language', 'en')
     self.server_url = self.conf_get('main', 'url')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port, 'admin')
     self.cred_member = xmlrpc_get_credential(self.credential_host,
                                              self.credential_port,
                                              'members')
コード例 #8
0
 def setUp(self):
     """Setting up test."""
     self.logd("setUp")
     self.server_url = self.conf_get('main', 'url')
     credential_host = self.conf_get('credential', 'host')
     credential_port = self.conf_getInt('credential', 'port')
     self.credential_host = credential_host
     self.credential_port = credential_port
     self.cred_admin = xmlrpc_get_credential(credential_host,
                                             credential_port, 'AdminZope')
     self.cred_member = xmlrpc_get_credential(credential_host,
                                              credential_port, 'FL_Member')
コード例 #9
0
ファイル: test_dav.py プロジェクト: patrek/nuxeo-distribution
 def setUp(self):
     self.server_url = self.conf_get('main', 'url')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port,
                                             'admin')
     self.dav_url = self.server_url + "/site/dav"
     self.nb_docs = self.conf_getInt('testWriter', 'nb_docs')
     self.cred_member = xmlrpc_get_credential(self.credential_host,
                                              self.credential_port,
                                              'members')
コード例 #10
0
 def setUp(self):
     """Setting up test."""
     self.logd("setUp")
     self.server_url = self.conf_get('main', 'url')
     credential_host = self.conf_get('credential', 'host')
     credential_port = self.conf_getInt('credential', 'port')
     self.credential_host = credential_host
     self.credential_port = credential_port
     self.cred_admin = xmlrpc_get_credential(credential_host,
                                             credential_port,
                                             'AdminZope')
     self.cred_member = xmlrpc_get_credential(credential_host,
                                              credential_port,
                                              'FL_Member')
コード例 #11
0
    def setUp(self):
        """Setting up test."""
        self.logd("setUp")
        self.server_url = self.conf_get('main', 'url')
        # XXX here you can setup the credential access like this
        credential_host = self.conf_get('credential', 'host')
        credential_port = self.conf_getInt('credential', 'port')
        self.login, self.password = xmlrpc_get_credential(credential_host,
                                                           credential_port,
                                                           'members')
        #self.login = '******'
        #self.password = '******'

        # Set the zope cookie. This is a little evil but avoids having to
        # call the login page.
        morsel = Morsel()
        morsel.key = '__ac'
        morsel.value = morsel.coded_value = urlquote(
            encodestring('%s:%s' % (self.login, self.password)))
        self._browser.cookies = {
            'rhaptos': {
                '/': {
                    '__ac': morsel
                }
            }
        }
コード例 #12
0
 def testInit(self):
     p = LoginPage(self).login(self.cred_admin[0], self.cred_admin[1])
     ret = p.viewDocumentPath(self.section_path, raiseOn404=False)
     if ret is None:
         # create a section, grant rights to members
         p = (p.getRootSections()
              .createSection(self.section_title, 'A description')
              .rights().grant('ReadWrite', 'Members group'))
     ret = p.viewDocumentPath(self.dir_path, raiseOn404=False)
     if ret is None:
         # create a workspace and a folder, grant rights to members
         p = (p.getRootWorkspaces()
              .createWorkspace(self.ws_title, 'A description')
              .rights().grant('ReadWrite', 'Members group')
              .view()
              .createFolder(self.dir_title, 'A description'))
     # create users
     login = self.cred_member[0]
     pwd = self.cred_member[1]
     first_login = login
     host = self.credential_host
     port = self.credential_port
     group = 'members'
     p = p.adminCenter().usersAndGroupsPage()
     while True:
         p.createUser(login, login + '@127.0.0.1', pwd, groups='members',
                      firstname="first", lastname=login.capitalize())
         login, pwd = xmlrpc_get_credential(host, port, group)
         if login == first_login:
             break
     p = p.exitAdminCenter()
     p.logout()
コード例 #13
0
    def setUp(self):
        """Setting up test, in current case just setting the server url."""
        self.logd("setUp")
        self.label = "Authenticated Tests (QAauth)"
        self.server_url = self.conf_get('main', 'url')
        hostname = urlparse(self.server_url)[1].split(':')[0]
        credential_host = self.conf_get('credential', 'host')
        credential_port = self.conf_getInt('credential', 'port')

        self.login, self.password = xmlrpc_get_credential(credential_host,
                                                           credential_port,
                                                           'members')

        # Set the zope cookie. This is a little evil but avoids having to
        # call the login page.
        morsel = Morsel()
        morsel.key = '__ac'
        morsel.value = morsel.coded_value = urlquote(
            encodestring('%s:%s' % (self.login, self.password)))
        self._browser.cookies = {
            hostname: {
                '/': {
                    '__ac': morsel
                }
            }
        }
コード例 #14
0
ファイル: test_nuxeo.py プロジェクト: skogtroll/nuxeo
 def testInit(self):
     p = LoginPage(self).login(self.cred_admin[0], self.cred_admin[1])
     ret = p.viewDocumentPath(self.section_path, raiseOn404=False)
     if ret is None:
         # create a section, grant rights to members
         p = (p.getRootSections().createSection(
             self.section_title,
             'A description').rights().grant('ReadWrite', 'Members group'))
     ret = p.viewDocumentPath(self.dir_path, raiseOn404=False)
     if ret is None:
         # create a workspace and a folder, grant rights to members
         p = (p.getRootWorkspaces().createWorkspace(
             self.ws_title, 'A description').rights().grant(
                 'ReadWrite', 'Members group').view().createFolder(
                     self.dir_title, 'A description'))
     # create users
     login = self.cred_member[0]
     pwd = self.cred_member[1]
     first_login = login
     host = self.credential_host
     port = self.credential_port
     group = 'members'
     p = p.adminCenter().usersAndGroupsPage()
     while True:
         p.createUser(login,
                      login + '@127.0.0.1',
                      pwd,
                      groups='members',
                      firstname="first",
                      lastname=login.capitalize())
         login, pwd = xmlrpc_get_credential(host, port, group)
         if login == first_login:
             break
     p = p.exitAdminCenter()
     p.logout()
コード例 #15
0
ファイル: test_Hipaa.py プロジェクト: Ch0c0late/jeeves
 def test_credential(self):
     credential_host = self.conf_get('credential', 'host')
     credential_port = self.conf_getInt('credential', 'port')
     login, pwd = xmlrpc_get_credential(credential_host, credential_port
         , "group1")
     self.login_as(login, pwd)
     self.logout()
コード例 #16
0
ファイル: test_rest.py プロジェクト: mindis/nuxeo
 def setUp(self):
     self.server_url = self.conf_get("main", "url")
     self.nb_doc = self.conf_getInt("testWriter", "nb_doc")
     self.nb_read = self.conf_getInt("testReader", "nb_read")
     self.credential_host = self.conf_get("credential", "host")
     self.credential_port = self.conf_getInt("credential", "port")
     self.cred_admin = xmlrpc_get_credential(self.credential_host, self.credential_port, "admin")
コード例 #17
0
ファイル: test_Hipaa.py プロジェクト: zhaojq-github/jeeves
 def test_credential(self):
     credential_host = self.conf_get('credential', 'host')
     credential_port = self.conf_getInt('credential', 'port')
     login, pwd = xmlrpc_get_credential(credential_host, credential_port,
                                        "group1")
     self.login_as(login, pwd)
     self.logout()
コード例 #18
0
 def setUp(self):
     self.server_url = self.conf_get('main', 'url')
     self.nb_doc = self.conf_getInt('testWriter', 'nb_doc')
     self.nb_read = self.conf_getInt('testReader', 'nb_read')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port, 'admin')
コード例 #19
0
ファイル: test_Jcourse.py プロジェクト: Ch0c0late/jeeves
    def setUp(self):
        """Setting up test."""
        self.server_url = self.conf_get('main', 'url')

        credential_host = self.conf_get('credential', 'host')
        credential_port = self.conf_getInt('credential', 'port')
        self.username, self.pwd = xmlrpc_get_credential(
            credential_host, credential_port, "group1")
コード例 #20
0
    def setUp(self):
        """Setting up test."""
        self.server_url = self.conf_get('main', 'url')

        credential_host = self.conf_get('credential', 'host')
        credential_port = self.conf_getInt('credential', 'port')
        self.username, self.pwd = xmlrpc_get_credential(
            credential_host, credential_port, "group1")
コード例 #21
0
 def setUp(self):
     """Setting up test."""
     self.logd("setUp")
     self.server_url = self.conf_get('main', 'url')
     credential_host = self.conf_get('credential', 'host')
     credential_port = self.conf_getInt('credential', 'port')
     self.login, self.password = xmlrpc_get_credential(credential_host,
                                                       credential_port,
                                                      'Member_Group')
コード例 #22
0
 def setUp(self):
     """Setting up test."""
     self.logd("setUp")
     self.server_url = self.conf_get("main", "url")
     self.paths_file = self.conf_get("main", "paths_file")
     # XXX here you can setup the credential access like this
     credential_host = self.conf_get("credential", "host")
     credential_port = self.conf_getInt("credential", "port")
     self.login, self.password = xmlrpc_get_credential(credential_host, credential_port, "funkloadgroup")
コード例 #23
0
ファイル: test_Cmf.py プロジェクト: Piers73600/pasteFunBot
	def setUp(self):
		self.logd("setUp")
		self.server_url = self.conf_get('main', 'url')
		credential_host = self.conf_get('credential', 'host')
		credential_port = self.conf_getInt('credential', 'port')
		self.credential_host = credential_host
		self.credential_port = credential_port
		self.cred_manager = xmlrpc_get_credential(credential_host, 
							  credential_port,
							  'managers')
コード例 #24
0
 def setUp(self):
     """Setting up test."""
     self.logd("setUp")
     self.server_url = self.conf_get('main', 'url')
     # XXX here you can setup the credential access like this
     credential_host = self.conf_get('credential', 'host')
     credential_port = self.conf_getInt('credential', 'port')
     self.login, self.password = xmlrpc_get_credential(credential_host,
                                                       credential_port,
                                                       'Member')
コード例 #25
0
ファイル: test_Login.py プロジェクト: Siyavula/emas.loadtest
 def setUp(self):
     """Setting up test."""
     self.logd("setUp")
     self._accept_invalid_links = True
     self.server_url = self.conf_get('main', 'url')
     # XXX here you can setup the credential access like this
     credential_host = self.conf_get('credential', 'host')
     credential_port = self.conf_getInt('credential', 'port')
     self.login, self.password = xmlrpc_get_credential(credential_host,
                                                       credential_port,
                                                       'funkloadgroup')
コード例 #26
0
 def setUp(self):
     self.server_url = self.conf_get('main', 'url')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port, 'admin')
     self.cred_member = xmlrpc_get_credential(self.credential_host,
                                              self.credential_port,
                                              'members')
     self.pglog_file = self.conf_get('main', 'pglog', '')
     self.log_dir = self.conf_get('main', 'log_dir', '')
     if not self.in_bench_mode:
         self.monitor_page = self.conf_getInt('main', 'monitor_page', '0')
         if self.monitor_page:
             self.logd("Tracing pg and jvm heap")
             if os.path.exists(self.pglog_file):
                 self.pglogf = open(self.pglog_file)
                 self.pglogf.seek(0, 2)
             else:
                 self.pglog_file = None
     self.logd("setUp")
コード例 #27
0
ファイル: testcase.py プロジェクト: Contenteco/nuxeo
 def setUp(self):
     self.server_url = self.conf_get('main', 'url')
     self.credential_host = self.conf_get('credential', 'host')
     self.credential_port = self.conf_getInt('credential', 'port')
     self.cred_admin = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port,
                                             'admin')
     self.cred_member = xmlrpc_get_credential(self.credential_host,
                                              self.credential_port,
                                              'members')
     self.pglog_file = self.conf_get('main', 'pglog', '')
     self.log_dir = self.conf_get('main', 'log_dir', '')
     if not self.in_bench_mode:
         self.monitor_page = self.conf_getInt('main', 'monitor_page', '0')
         if self.monitor_page:
             self.logd("Tracing pg and jvm heap")
             if os.path.exists(self.pglog_file):
                 self.pglogf = open(self.pglog_file)
                 self.pglogf.seek(0, 2)
             else:
                 self.pglog_file = None
     self.logd("setUp")
コード例 #28
0
    def test_createUser(self):
        # The description should be set in the configuration file
        server_url = self.server_url
        # begin of test ---------------------------------------------

        user = xmlrpc_get_credential(self.credential_host,
                                     self.credential_port, 'writers')

        receiver = xmlrpc_get_credential(self.credential_host,
                                         self.credential_port, 'readers')

        self.post(server_url + "/nxstartup.faces",
                  params=[['user_name', self.cred_admin[0]],
                          ['user_password', self.cred_admin[1]],
                          ['requestedUrl', ''], ['form_submitted_marker', ''],
                          ['Submit', 'Connexion']],
                  description="Log in")
        self.assert_('You are logged as ' +
                     self.cred_admin[0] in self.getBody())

        self.get(
            server_url +
            "/nxpath/default/correspondence@view_users?subTabId=&tabId=TAB_CONTENT&conversationId=0NXMAIN&currentEmailId=",
            description="Get /nuxeo/nxpath/defau...pondence@view_users")
        self.assert_('Create a new user' in self.getBody())

        self.post(server_url + "/view_users.faces",
                  params=[['j_id216_SUBMIT', '1'],
                          ['j_id216:j_id218', 'j_id216:j_id218'],
                          ['javax.faces.ViewState',
                           self.getLastJsfState()]],
                  description="Post /nuxeo/view_users.faces")

        self.post(
            server_url + "/create_user.faces",
            params=[
                ['createUser:nxl_user:nxw_lastname', ''],
                ['createUser_SUBMIT', '1'],
                ['createUser:nxl_user:nxw_firstPassword', user[1]],
                ['createUser:button_create', 'Save'],
                ['createUser:nxl_user:nxw_secondPassword', user[1]],
                ['javax.faces.ViewState',
                 self.getLastJsfState()],
                ['createUser:nxl_user:nxw_firstname', ''],
                ['createUser:nxl_user:nxw_company', ''],
                ['createUser:nxl_user:nxw_username', user[0]],
                ['createUser:nxl_user:nxw_groups_suggestionBox_selection', ''],
                ['createUser:nxl_user:nxw_groups_suggest', ''],
                ['createUser:nxl_user:nxw_email', user[0]],
                ['createUser:nxl_user:nxw_passwordMatcher', 'needed']
            ],
            description="Post /nuxeo/create_user.faces")

        first_login = receiver[0]
        while True:
            # create user

            self.get(
                server_url +
                "/nxpath/default/correspondence@view_users?subTabId=&tabId=TAB_CONTENT&conversationId=0NXMAIN&currentEmailId=",
                description="Get /nuxeo/nxpath/defau...pondence@view_users")

            self.assert_('Create a new user' in self.getBody())

            self.post(
                server_url + "/view_users.faces",
                params=[['j_id216_SUBMIT', '1'],
                        ['j_id216:j_id218', 'j_id216:j_id218'],
                        ['javax.faces.ViewState',
                         self.getLastJsfState()]],
                description="Post /nuxeo/view_users.faces")

            self.post(
                server_url + "/create_user.faces",
                params=
                [['createUser:nxl_user:nxw_lastname', ''],
                 ['createUser_SUBMIT', '1'],
                 ['createUser:nxl_user:nxw_firstPassword', receiver[1]],
                 ['createUser:button_create', 'Save'],
                 ['createUser:nxl_user:nxw_secondPassword', receiver[1]],
                 ['javax.faces.ViewState',
                  self.getLastJsfState()],
                 ['createUser:nxl_user:nxw_firstname', ''],
                 ['createUser:nxl_user:nxw_company', ''],
                 ['createUser:nxl_user:nxw_username', receiver[0]],
                 [
                     'createUser:nxl_user:nxw_groups_suggestionBox_selection',
                     ''
                 ], ['createUser:nxl_user:nxw_groups_suggest', ''],
                 ['createUser:nxl_user:nxw_email', receiver[0]],
                 ['createUser:nxl_user:nxw_passwordMatcher', 'needed']],
                description="Post /nuxeo/create_user.faces")

            receiver = xmlrpc_get_credential(self.credential_host,
                                             self.credential_port, 'readers')
            if receiver[0] == first_login:
                break

        self.get(server_url + "/logout", description="Get /nuxeo/logout")
コード例 #29
0
ファイル: test_Nxc.py プロジェクト: administration-solrep/EPG
    def test_nxc_writer(self):
        # The description should be set in the configuration file
        server_url = self.server_url
        # begin of test ---------------------------------------------
        lipsum = self._lipsum
        user =  xmlrpc_get_credential(self.credential_host,
                                      self.credential_port,
                                      'writers')

        receiver =  xmlrpc_get_credential(self.credential_host,
                                          self.credential_port,
                                          'readers')

        today = datetime.today().strftime('%m/%d/%y')

        self.post(server_url + "/nxstartup.faces", params=[
            ['user_name', user[0]],
            ['user_password', user[1]],
            ['requestedUrl', ''],
            ['form_submitted_marker', ''],
            ['Submit', 'Connexion']],
            description="Log in")
        self.assert_('You are logged as ' + user[0] in self.getBody())


        self.get(server_url + "/nxpath/default/correspondence/mailboxes/mailmanagement@mailbox_view?tabId=&conversationId=0NXMAIN",
                 description="View mailmnanagement")

        self.assert_('Create an incoming mail' in self.getBody())

        self.post(server_url + "/correspondence/mailbox/mailbox_view.faces", params=[
            ['j_id245', 'j_id245'],
            ['javax.faces.ViewState', self.getLastJsfState()],
            ['j_id245:j_id246', 'j_id245:j_id246'],            
            ['j_id245_SUBMIT', '1']],
            description="View mail form")

        self.assert_('nxl_head_correspondence_incoming_document' in self.getBody())

        self.post(server_url + "/correspondence/mail/create_correspondence_document.faces", params=[
            ['AJAXREQUEST', 'document_create:nxl_correspondence_document:nxw_contactsRecipients:nxw_contactsRecipients_region'],
            ['document_create', 'document_create'],
            ['document_create:nxl_correspondence_document:nxw_title', ''],
            ['document_create:nxl_correspondence_document:nxw_document_type', '2'],
            ['document_create:nxl_correspondence_document:nxw_sending_date', ''],
            ['document_create_link_hidden_', 'document_create:nxl_correspondence_document:nxw_sending_date:trigger'],
            ['document_create_link_hidden_', 'document_create:nxl_correspondence_document:nxw_receive_date:trigger'],
            ['document_create_link_hidden_', 'document_create:nxl_correspondence_document:nxw_document_date:trigger'],
            ['document_create_link_hidden_', 'document_create:nxl_head_correspondence_incoming_document:nxw_scan_date:trigger'],
            ['document_create:nxl_correspondence_document:nxw_receive_date', ''],
            ['document_create:nxl_correspondence_document:nxw_document_date', ''],
            ['document_create:nxl_correspondence_document:nxw_confidentiality', '4'],
            ['document_create:nxl_correspondence_document:nxw_origin', ''],
            ['document_create:nxl_correspondence_document:nxw_reference', ''],
            ['document_create:nxl_correspondence_document:nxw_body', ''],
            ['mce_editor_0_styleSelect', ''],
            ['mce_editor_0_formatSelect', ''],
            ['document_create:nxl_head_correspondence_incoming_document:nxw_scan_site', ''],
            ['document_create:nxl_head_correspondence_incoming_document:nxw_scan_date', ''],
            ['document_create:nxl_file:nxw_file:nxw_file_file:choice', 'none'],
            ['document_create:nxl_file:nxw_file:nxw_file_file:upload', ''],
            ['javax.faces.ViewState', self.getLastJsfState()],
            ['type', 'add'],
            ['document_create:nxl_correspondence_document:nxw_contactsRecipients:nxw_contactsRecipients_add', 'document_create:nxl_correspondence_document:nxw_contactsRecipients:nxw_contactsRecipients_add'],
            ['for', 'nxw_contactsRecipients_list']],
            description="Add recipient")

        self.post(server_url + "/correspondence/mail/create_correspondence_document.faces", params=[
            ['AJAXREQUEST', 'document_create:nxl_correspondence_document:nxw_contactsSenders:nxw_contactsSenders_region'],
            ['document_create', 'document_create'],
            ['document_create:nxl_correspondence_document:nxw_title', ''],
            ['document_create:nxl_correspondence_document:nxw_document_type', '2'],
            ['document_create:nxl_correspondence_document:nxw_contactsRecipients:nxw_contactsRecipients_list:0:nxw_contactsRecipients_name', ''],
            ['document_create:nxl_correspondence_document:nxw_contactsRecipients:nxw_contactsRecipients_list:0:nxw_contactsRecipients_surname', ''],
            ['document_create:nxl_correspondence_document:nxw_contactsRecipients:nxw_contactsRecipients_list:0:nxw_contactsRecipients_service', ''],
            ['document_create:nxl_correspondence_document:nxw_sending_date', ''],
            ['document_create_link_hidden_', 'document_create:nxl_correspondence_document:nxw_sending_date:trigger'],
            ['document_create_link_hidden_', 'document_create:nxl_correspondence_document:nxw_receive_date:trigger'],
            ['document_create_link_hidden_', 'document_create:nxl_correspondence_document:nxw_document_date:trigger'],
            ['document_create_link_hidden_', 'document_create:nxl_head_correspondence_incoming_document:nxw_scan_date:trigger'],
            ['document_create:nxl_correspondence_document:nxw_receive_date', ''],
            ['document_create:nxl_correspondence_document:nxw_document_date', ''],
            ['document_create:nxl_correspondence_document:nxw_confidentiality', '4'],
            ['document_create:nxl_correspondence_document:nxw_origin', ''],
            ['document_create:nxl_correspondence_document:nxw_reference', ''],
            ['document_create:nxl_correspondence_document:nxw_body', ''],
            ['mce_editor_0_styleSelect', ''],
            ['mce_editor_0_formatSelect', ''],
            ['document_create:nxl_head_correspondence_incoming_document:nxw_scan_site', ''],
            ['document_create:nxl_head_correspondence_incoming_document:nxw_scan_date', ''],
            ['document_create:nxl_file:nxw_file:nxw_file_file:choice', 'none'],
            ['document_create:nxl_file:nxw_file:nxw_file_file:upload', ''],
            ['javax.faces.ViewState', self.getLastJsfState()],
            ['document_create:nxl_correspondence_document:nxw_contactsSenders:nxw_contactsSenders_add', 'document_create:nxl_correspondence_document:nxw_contactsSenders:nxw_contactsSenders_add'],
            ['type', 'add'],
            ['for', 'nxw_contactsSenders_list']],
            description="Add sender")

        self.post(server_url + "/correspondence/mail/create_correspondence_document.faces", params=[
            ['document_create', 'document_create'],
            ['document_create:nxl_correspondence_document:nxw_title', lipsum.getSubject()],
            ['document_create:nxl_correspondence_document:nxw_document_type', '2'],

            ['document_create:nxl_correspondence_document:nxw_contactsRecipients:nxw_contactsRecipients_list:0:nxw_contactsRecipients_name', lipsum.getWord()],
            ['document_create:nxl_correspondence_document:nxw_contactsRecipients:nxw_contactsRecipients_list:0:nxw_contactsRecipients_surname', lipsum.getWord()],
            ['document_create:nxl_correspondence_document:nxw_contactsRecipients:nxw_contactsRecipients_list:0:nxw_contactsRecipients_service', lipsum.getWord()],
            ['document_create:nxl_correspondence_document:nxw_sending_date', today + ' 1:00 PM'],
            ['document_create:nxl_correspondence_document:nxw_receive_date', today + ' 2:00 PM'],
            ['document_create:nxl_correspondence_document:nxw_document_date', today + ' 11:00 AM'],
            ['document_create:nxl_correspondence_document:nxw_confidentiality', '4'],
            ['document_create:nxl_correspondence_document:nxw_contactsSenders:nxw_contactsSenders_list:0:nxw_contactsSenders_name', lipsum.getWord()],
            ['document_create:nxl_correspondence_document:nxw_contactsSenders:nxw_contactsSenders_list:0:nxw_contactsSenders_surname', lipsum.getWord()],
            ['document_create:nxl_correspondence_document:nxw_contactsSenders:nxw_contactsSenders_list:0:nxw_contactsSenders_service', lipsum.getWord()],
            ['document_create:nxl_correspondence_document:nxw_origin', lipsum.getAddress()],
            ['document_create:nxl_correspondence_document:nxw_reference', lipsum.getUniqWord()],
            ['document_create:nxl_correspondence_document:nxw_body', lipsum.getParagraph()],
            ['document_create:nxl_head_correspondence_incoming_document:nxw_scan_site', 'nuxeo'],
            ['document_create:nxl_head_correspondence_incoming_document:nxw_scan_date', today + ' 10:00 AM'],
            ['document_create:nxl_file:nxw_file:nxw_file_file:choice', 'upload'],
            ['document_create_SUBMIT', '1'],
            ['document_create:nxl_file:nxw_file:nxw_file_file:upload', Upload("hello.pdf")],
            ['document_create:j_id384', 'Create'],
            ['javax.faces.ViewState', self.getLastJsfState()]],
            description="Submit new mail")

        self.assert_('Incoming mail saved' in self.getBody())


        self.post(server_url + "/correspondence/mail/view_correspondence_envelope.faces", params=[
            ['j_id359', 'j_id359'],
            ['javax.faces.ViewState', self.getLastJsfState()],
            ['j_id359_SUBMIT', '1'],
            ['j_id359:j_id360:j_id361:0:j_id362', 'j_id359:j_id360:j_id361:0:j_id362']],
            description="View distribution form")
        self.assert_('distribution_recipients' in self.getBody())

        self.post(server_url + "/correspondence/mail/distribution_correspondence_envelope.faces", params=[
            ['AJAXREQUEST', 'distribution_recipients:nxl_correspondence_recipients:j_id347'],
            ['distribution_recipients', 'distribution_recipients'],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggest', receiver[0]],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggestionBox_selection', ''],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_copy_recipients_suggest', ''],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_copy_recipients_suggestionBox_selection', ''],
            ['distribution_recipients:comment', ''],
            ['javax.faces.ViewState', self.getLastJsfState()],
            ['ajaxSingle', 'distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggestionBox'],
            ['mailboxSuggestionSearchType', ''],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggestionBox', 'distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggestionBox'],
            ['inputvalue', receiver[0]],
            ['AJAX:EVENTS_COUNT', '1']],
            description="Search receiver")

        self.assert_(receiver[0] in self.getBody())

        self.post(server_url + "/correspondence/mail/distribution_correspondence_envelope.faces", params=[
            ['AJAXREQUEST', 'distribution_recipients:nxl_correspondence_recipients:j_id347'],
            ['distribution_recipients', 'distribution_recipients'],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggest', ''],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggestionBox_selection', '0'],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_copy_recipients_suggest', ''],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_copy_recipients_suggestionBox_selection', ''],
            ['distribution_recipients:comment', ''],
            ['javax.faces.ViewState', self.getLastJsfState()],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggestionBox:j_id354', 'distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggestionBox:j_id354'],
            ['suggestionSelectionListId', 'nxw_action_recipients_list']],
            description="Select receiver")

        self.post(server_url + "/correspondence/mail/distribution_correspondence_envelope.faces", params=[
            ['distribution_recipients', 'distribution_recipients'],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggest', ''],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_action_recipients_suggestionBox_selection', ''],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_copy_recipients_suggest', ''],
            ['distribution_recipients:nxl_correspondence_recipients:nxw_copy_recipients_suggestionBox_selection', ''],
            ['distribution_recipients:comment', lipsum.getSentence()],
            ['distribution_recipients:j_id406', 'Send'],
            ['distribution_recipients_SUBMIT', '1'],
            ['javax.faces.ViewState', self.getLastJsfState()]],
            description="Send mail")

        self.assert_('The distribution is done' in self.getBody())

        self.get(server_url + "/logout",
            description="Log out")
コード例 #30
0
ファイル: main.py プロジェクト: syslabcom/osha.loadtest
def get_credentials(group):
    cred_host, cred_port = os.environ[
        'LOADTEST_CREDENTIAL_SERVER'].split(':')
    return xmlrpc_get_credential(cred_host, cred_port, group)