mock_envvar

mock_envvar(envvar: str, value: str) Iterator[None][source]

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

Parameters:
  • envvar – The environment variable to mock

  • value – 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.