def tearDown(self): """ Simulates middleware teardown """ global requests for r in requests: UserSession.disconnect(r)
def process_response(self, request, response): UserSession.disconnect(request) return response