(_dummy_socket)
| 92 | |
| 93 | |
| 94 | def test_fixture_reader_thread3(_dummy_socket): |
| 95 | sock = _DummySocket() |
| 96 | |
| 97 | reader_thread = ReaderThread(sock) |
| 98 | reader_thread.start() |
| 99 | |
| 100 | msg = "aaaaaaabbbbbbbccccccc" |
| 101 | http = "Content-Length: %s\r\n\r\n%s" % (len(msg), msg) |
| 102 | http *= 2 |
| 103 | initial = http |
| 104 | for i in range(1, len(http)): |
| 105 | while http: |
| 106 | sock.put(http[:i]) |
| 107 | http = http[i:] |
| 108 | |
| 109 | assert reader_thread.get_next_message("check 1: %s" % i) == msg |
| 110 | assert reader_thread.get_next_message("check 2: %s" % i) == msg |
| 111 | http = initial |
nothing calls this directly
no test coverage detected