4646import logging
4747import unittest
4848import sys
49+ from urllib import request
4950
5051import tuf
5152import tuf .formats
5758from tests import utils
5859
5960import securesystemslib
60- import six
6161
6262logger = logging .getLogger (__name__ )
6363
@@ -176,7 +176,7 @@ def test_without_tuf(self):
176176 url_file = os .path .join (url_prefix , 'targets' , 'file1.txt' )
177177
178178 # On Windows, the URL portion should not contain backslashes.
179- six . moves . urllib . request .urlretrieve (url_file .replace ('\\ ' , '/' ), client_target_path )
179+ request .urlretrieve (url_file .replace ('\\ ' , '/' ), client_target_path )
180180
181181 self .assertTrue (os .path .exists (client_target_path ))
182182 length , hashes = securesystemslib .util .get_file_details (client_target_path )
@@ -194,7 +194,7 @@ def test_without_tuf(self):
194194 self .assertTrue (large_length > length )
195195
196196 # On Windows, the URL portion should not contain backslashes.
197- six . moves . urllib . request .urlretrieve (url_file .replace ('\\ ' , '/' ), client_target_path )
197+ request .urlretrieve (url_file .replace ('\\ ' , '/' ), client_target_path )
198198
199199 length , hashes = securesystemslib .util .get_file_details (client_target_path )
200200 download_fileinfo = tuf .formats .make_targets_fileinfo (length , hashes )
@@ -269,7 +269,7 @@ def test_with_tuf(self):
269269 self .repository_updater .refresh ()
270270
271271 except tuf .exceptions .NoWorkingMirrorError as exception :
272- for mirror_url , mirror_error in six . iteritems ( exception .mirror_errors ):
272+ for mirror_url , mirror_error in exception .mirror_errors . items ( ):
273273 self .assertTrue (isinstance (mirror_error , securesystemslib .exceptions .Error ))
274274
275275 else :
0 commit comments