ensure that the env config is not mutated after test
Merge pull request #536 from Tahi-project/restore_env_after_test

Ensure that the env config is not mutated after test