Exemple #1
0
    def test_node_rename_log(self):
        """
        test to make sure that project log works correctly on renaming the node

        """

        #rename the project
        node_new_name = str(uuid.uuid1())[:6]
        util.project_rename(self.driver, node_new_name)

        #get log
        util.goto_project(self.driver)
        message_log = self.get_log()

        #assert the time
        self._assert_time(message_log.log_time)

        #assert the log
        self.assertEqual(
            message_log.log_text,
            self.user_data["fullname"] + " changed the title from " +
            config.node_title + " to " + node_new_name)

        #check the user_url and node_url
        self.assertEqual(message_log.log_url[0], self.get_user_url())
        self.assertEqual(message_log.log_url[1] + "/", self.node_url)
    def test_node_rename_log(self):
        """
        test to make sure that project log works correctly on renaming the node

        """

        #rename the project
        node_new_name=str(uuid.uuid1())[:6]
        util.project_rename(self.driver, node_new_name)

         #get log
        util.goto_project(self.driver)
        message_log = self.get_log()

        #assert the time
        self._assert_time(message_log.log_time)

        #assert the log
        self.assertEqual(message_log.log_text, self.user_data["fullname"] + " changed the title from "
                                               + config.node_title + " to " + node_new_name)


        #check the user_url and node_url
        self.assertEqual(message_log.log_url[0], self.get_user_url())
        self.assertEqual(message_log.log_url[1]+"/", self.node_url)
Exemple #3
0
    def test_project_rename_log(self):
        """
        test to make sure that rename the project log works correctly

        """
        #get user_url
        user_url = self.get_user_url()

        #rename the project
        project_new_name = str(uuid.uuid1())[:6]
        util.project_rename(self.driver, project_new_name)

         #get log
        message_log = self.get_log()

        #assert the time
        self._assert_time(message_log.log_time)

        #assert the log
        self.assertEqual(
            message_log.log_text,
            u"{} changed the title from {} to {}".format(
                self.user_data["fullname"],
                config.project_title,
                project_new_name,
                )
        )

        #check the user_url and project_url
        self.assertEqual(
            message_log.log_url[0],
            user_url,
        )
        self.assertEqual(
            message_log.log_url[1],
            self.project_url.strip('/'),
        )

        #cleanup
        util.project_rename(self.driver, config.project_title)