Exemplo n.º 1
0
def test_filecomm_query():
    comm = FileCommunicator(mock.MagicMock())
    comm._testing = True  # to disable the delay in the _query function
    comm._filelike.read = mock.MagicMock(side_effect=[b"a", b"b", b"c", b"\n"])

    assert comm._query("mock") == "abc"
Exemplo n.º 2
0
def test_filecomm_query():
    comm = FileCommunicator(mock.MagicMock())
    comm._testing = True  # to disable the delay in the _query function
    comm._filelike.read = mock.MagicMock(side_effect=[b"a", b"b", b"c", b"\n"])

    eq_(comm._query("mock"), "abc")