コード例 #1
0
ファイル: urlobject_test.py プロジェクト: vartagg/urlblocks
    def test_with_auth_with_two_args_replaces_whole_auth_string_with_username_and_password(self):
        # Replaces username-only auth string
        url = URL('https://[email protected]/')
        assert url.with_auth('zack', '1234') == 'https://*****:*****@github.com/'

        # Replaces username and password.
        url = URL('https://*****:*****@github.com/')
        assert url.with_auth('zack', '1234') == 'https://*****:*****@github.com/'
コード例 #2
0
ファイル: urlobject_test.py プロジェクト: vartagg/urlblocks
 def test_with_auth_with_one_arg_replaces_whole_auth_string_with_username(self):
     url = URL('https://*****:*****@github.com/')
     assert url.with_auth('zack') == 'https://[email protected]/'
コード例 #3
0
ファイル: urlobject_test.py プロジェクト: vartagg/urlblocks
 def test_with_auth_with_two_args_adds_username_and_password(self):
     url = URL('https://github.com/')
     assert url.with_auth('zack', '1234') == 'https://*****:*****@github.com/'
コード例 #4
0
ファイル: urlobject_test.py プロジェクト: vartagg/urlblocks
 def test_with_auth_with_one_arg_adds_username(self):
     url = URL('https://github.com/')
     assert url.with_auth('zack') == 'https://[email protected]/'