Unit-Testing Federations (or networks in general)

Hello !

I’ve been writing unit tests in Django and we rely quite heavily on ActivityStreams messages being sent between servers in the federation. The first solution I wrote turned out to have an infinite loop in it, because two servers were reacting to each other’s messages by sending another one :grin: infinite oneupmanship

if I had a magic wand I’d love to be able to write unit tests in which I had multiple servers. I haven’t been able to find anything like this for Django specifically, but does anyone know of any examples in other frameworks, have any insight into the topic or any interesting reading ?