An often overlooked strategy for fighting the COVID-19 pandemic is group testing. Its main advantage is that it can scale, enabling the regular testing of the whole population. We argue that another advantage is that it can induce social distancing. Using a simple model, we show that if a group tests positive and its members are in close social proximity, then they will rationally choose not to meet. The driving force is the uncertainty about who has the virus and the fact that the group cares about its collective welfare. We therefore propose identifying socially connected groups, such as colleagues, friends and neighbours, and testing them regularly.