Authorities in Beijing are cracking down as it expands mass testing in its districts and steps up efforts to prevent a larger outbreak like the one in Shanghai.