'Leave the test mode.'

def leave_test_mode(self):

    assert (self.test_cr is not None)
    self.clear_caches()
    self.test_cr.force_close()
    self.test_cr = None
    assert (Registry._saved_lock is not None)
    Registry._lock = Registry._saved_lock
    Registry._saved_lock = None
