Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_git_remote(monkeypatch):
monkeypatch.setenv(GITHUB_TOKEN_KEY, "test-github-token")
assert git_remote("jupyterhub/helm-chart") == "https://test-github-token@github.com/jupyterhub/helm-chart"
monkeypatch.delenv(GITHUB_TOKEN_KEY)
assert git_remote("jupyterhub/helm-chart") == "git@github.com:jupyterhub/helm-chart"
def test_git_remote(monkeypatch):
monkeypatch.setenv(GITHUB_TOKEN_KEY, "test-github-token")
assert git_remote("jupyterhub/helm-chart") == "https://test-github-token@github.com/jupyterhub/helm-chart"
monkeypatch.delenv(GITHUB_TOKEN_KEY)
assert git_remote("jupyterhub/helm-chart") == "git@github.com:jupyterhub/helm-chart"