Esempio n. 1
0
    def test_html(self):
        """ should render html """

        dom = '<div class="test-me">me</div>'

        result = render.html(dom)
        self.assertGreater(len(result), 1)
Esempio n. 2
0
    def test_html(self):
        """Should render html"""

        dom = '<div class="test-me">me</div>'

        result = render.html(dom)
        self.assertGreater(len(result), 1)
Esempio n. 3
0
def html(dom: str):
    """
    A string containing a valid HTML snippet

    :param dom:
        The HTML string to add to the display
    """

    r = _get_report()
    r.append_body(render.html(dom))
Esempio n. 4
0
def html(dom: str):
    """
    A string containing a valid HTML snippet.

    :param dom:
        The HTML string to add to the display.
    """
    r = _get_report()
    r.append_body(render.html(dom))
    r.stdout_interceptor.write_source('[ADDED] HTML\n')
Esempio n. 5
0
def html(dom: str):
    """
    A string containing a valid HTML snippet.

    :param dom:
        The HTML string to add to the display.
    """
    r = _get_report()
    r.append_body(render.html(dom))
    r.stdout_interceptor.write_source('[ADDED] HTML\n')
Esempio n. 6
0
def run(
        project: 'projects.Project',
        step: 'projects.ProjectStep'
) -> dict:
    """

    :param project:
    :param step:
    :return:
    """

    with open(step.source_path, 'r') as f:
        code = f.read()

    step.report.append_body(render.html(templating.render(
        template=code,
        **project.shared.fetch(None)
    )))

    return {'success': True}