Calling context manager that changes settings while running tests