Пример #1
0
 def test_with_password_raises_ValueError_when_there_is_no_username(self):
     url = URL('https://github.com/')
     assert_raises(ValueError, lambda: url.with_password('1234'))
Пример #2
0
 def test_with_password_replaces_password(self):
     url = URL('https://*****:*****@github.com/')
     assert url.with_password('5678') == 'https://*****:*****@github.com/'
Пример #3
0
 def test_with_password_adds_password(self):
     url = URL('https://[email protected]/')
     assert url.with_password('1234') == 'https://*****:*****@github.com/'