mock_envvar

mock_envvar(envvar, value)[source]

Mock the environment variable then delete it after the test is over.

Parameters:
  • envvar (str) – The environment variable to mock

  • value (str) – The value to temporarily put in the environment variable during this mock.

Yield:

None, since this just mocks the environment variable for the time being.

Return type:

Iterator[None]