Ejemplo n.º 1
0
def test_reader():
    class MockQueue(object):
        def __init__(self):
            self.data = []

        def put(self, output):
            self.data.append(output)

    reader = ShellReader()
    reader.f_name = sample_stream
    reader.queue = MockQueue()
    reader.do_work()
    unescaped_html_content(reader.queue.data[2])
    import ipdb; ipdb.set_trace()
def test_reader():
    class MockQueue(object):
        def __init__(self):
            self.data = []

        def put(self, output):
            self.data.append(output)

    reader = ShellReader()
    reader.f_name = sample_stream
    reader.queue = MockQueue()
    reader.do_work()
    unescaped_html_content(reader.queue.data[2])
    import ipdb
    ipdb.set_trace()
Ejemplo n.º 3
0
def test_escape_html():
    reader = ShellReader()
    value = reader.escape_html(html_unescaped)
    assert value == html_escaped, "Escaping html failed"
def test_escape_html():
    reader = ShellReader()
    value = reader.escape_html(html_unescaped)
    assert value == html_escaped, "Escaping html failed"