Ejemplo n.º 1
0
    def test_render_termial_output(self):
        """
        :return:
        """
        term_server = TerminalServer()
        term_server.term_title = '测试终端输出用'
        term_server.term_output = '测试终端输出的内容'

        term_output = [term_server, term_server]

        user = User.obj(username=User.rootAccount)
        if not user:
            User.createRoot()
            user = User.obj(username=User.rootAccount)

        views = Views(user)
        views.render_terminal_output(term_output)
        views.html('terminal_output')
Ejemplo n.º 2
0
    def test_render_sim_term_local_server(self):
        """
        :return:
        """
        term_server = TerminalServer()
        term_server.term_title = '本地服务进程'
        term_server.term_output = '测试终端输出的内容'

        term_output = [term_server, term_server]

        user = User.obj(username=User.rootAccount)
        if not user:
            User.createRoot()
            user = User.obj(username=User.rootAccount)

        views = Views(user)
        views.render_terminal_output(term_output)
        views.render_terminal_input()

        views.render_sim_term_local_server(SimTermLocalServer)
        views.html('sim_term_local_server')