I want to dynamically change token in my bashrc to assert an expected outcome.
For example: in my ~/.bashrc i have my token set
export GITHUB_ACCESS_TOKEN=ghp_NNNNNNNNNNNN
During the test I want to set the token
export GITHUB_ACCESS_TOKEN=TEST
and then assert to check that I cant access my repos by running a click command:
result = runner.invoke(clicker_cli, ["git", "clone", "<url_here>"])
It is not working as intended. I can still access my repo with my original token.
Context: I am using https://click.palletsprojects.com/en/8.0.x/ https://docs.pytest.org/en/6.2.x/monkeypatch.html