Fix tests by restoring monkey patched thread local

Save original before monkey patch in setUp and restore during tearDown