def test_with_auth_with_two_args_replaces_whole_auth_string_with_username_and_password(self): # Replaces username-only auth string url = URLObject('https://[email protected]/') assert url.with_auth('zack', '1234') == 'https://*****:*****@github.com/' # Replaces username and password. url = URLObject('https://*****:*****@github.com/') assert url.with_auth('zack', '1234') == 'https://*****:*****@github.com/'
def test_with_auth_with_one_arg_replaces_whole_auth_string_with_username(self): url = URLObject('https://*****:*****@github.com/') assert url.with_auth('zack') == 'https://[email protected]/'
def test_with_auth_with_two_args_adds_username_and_password(self): url = URLObject('https://github.com/') assert url.with_auth('zack', '1234') == 'https://*****:*****@github.com/'
def test_with_auth_with_one_arg_adds_username(self): url = URLObject('https://github.com/') assert url.with_auth('zack') == 'https://[email protected]/'