Ejemplo n.º 1
0
    def _get_url_and_credentials(
        self, original_url: str
    ) -> Tuple[str, Optional[str], Optional[str]]:
        url, username, password = super()._get_url_and_credentials(original_url)

        if username:
            username = expand_env_vars(username)

        if password:
            password = expand_env_vars(password)

        return url, username, password
Ejemplo n.º 2
0
def test_expand_env_vars(given, expected, monkeypatch):
    monkeypatch.setenv("FOO", "hello")
    assert utils.expand_env_vars(given) == expected