Closed rbuckland closed 1 year ago
Hi @rbuckland,
I have the suspect that it won't be that easy.
Every MocketEntry
is bound to a request, which triggers it. So, depending on what data
the client sends, Mocket understands if there's something to be served or it has to talk to a real socket instead.
In your case there is nothing, because you expect Mocket to react straight after a connect()
.
You could try patching it and see what happens.
We have a real-world systm, where on tcp connect, the server responds first.
Is there a way to setup a "MocketEntry" that is fired on first connect. The behaviour i have observed is that an entry only comes after a client sends. This makes sense; we have the scenario to mock where the server talks first.
Below is an example. the example of course does not have to be asyncio.