mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Minor changes following review
This commit is contained in:
parent
61e94847af
commit
c2eec3e42f
6 changed files with 3 additions and 42 deletions
|
|
@ -214,7 +214,6 @@ def build_repository(project_directory):
|
|||
except ValueError, e:
|
||||
message = 'Invalid expiration date entered'
|
||||
logger.error(message)
|
||||
print(message)
|
||||
timeout = None
|
||||
continue
|
||||
|
||||
|
|
@ -273,7 +272,6 @@ def build_repository(project_directory):
|
|||
metadata_directory = os.path.join(repository_directory, 'metadata')
|
||||
message = 'Creating '+repr(metadata_directory)
|
||||
logger.info(message)
|
||||
print(message)
|
||||
os.mkdir(metadata_directory)
|
||||
except OSError, e:
|
||||
if e.errno == errno.EEXIST:
|
||||
|
|
@ -312,7 +310,6 @@ def build_repository(project_directory):
|
|||
except ValueError, e:
|
||||
message = 'Invalid role threshold entered'
|
||||
logger.warning(message)
|
||||
print(message)
|
||||
role_threshold = None
|
||||
continue
|
||||
|
||||
|
|
@ -371,7 +368,6 @@ def build_repository(project_directory):
|
|||
repr(client_metadata_directory)+'. The client metadata '+\
|
||||
'will need to be manually created. See the README file.'
|
||||
logger.warn(message)
|
||||
print(message)
|
||||
else:
|
||||
raise
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
<Started>
|
||||
January 26, 2013
|
||||
|
||||
August 2013. Modified previous behavior that explicitly imported individual
|
||||
unit tests. -Zane Fisher
|
||||
|
||||
<Copyright>
|
||||
See LICENSE for licensing information.
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ def test_clear_roledb(self):
|
|||
|
||||
def test_add_role(self):
|
||||
# Test conditions where the arguments are valid.
|
||||
print('ROLES: '+str(tuf.roledb._roledb_dict.keys()))
|
||||
self.assertEqual(0, len(tuf.roledb._roledb_dict))
|
||||
rolename = 'targets'
|
||||
roleinfo = {'keyids': ['123'], 'threshold': 1}
|
||||
|
|
|
|||
|
|
@ -1483,13 +1483,5 @@ def _mock_get_keyids(junk):
|
|||
signercli._get_metadata_directory = original_get_metadata_directory
|
||||
|
||||
|
||||
# Run unit tests.
|
||||
#loader = unittest_toolbox.unittest.TestLoader
|
||||
#suite = loader().loadTestsFromTestCase(TestSignercli)
|
||||
#try:
|
||||
# unittest_toolbox.unittest.TextTestRunner(verbosity=2).run(suite)
|
||||
#finally:
|
||||
# unittest_toolbox.Modified_TestCase.clear_toolbox()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -896,14 +896,5 @@ def _get_signed_role_info(self, role, directory=None):
|
|||
return signed_meta, role_info
|
||||
|
||||
|
||||
|
||||
# Run unit test.
|
||||
#suite = unittest.TestLoader().loadTestsFromTestCase(TestSignerlib)
|
||||
#try:
|
||||
# unittest.TextTestRunner(verbosity=2).run(suite)
|
||||
#finally:
|
||||
# unit_tbox.clear_toolbox()
|
||||
# tuf.repo.keystore.clear_keystore()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
|
|
@ -1139,25 +1139,5 @@ def test_8_remove_obsolete_targets(self):
|
|||
tuf.download.download_url_to_tempfileobj = original_download
|
||||
|
||||
|
||||
|
||||
|
||||
# Run all unit tests.
|
||||
#loader = unittest_toolbox.unittest.TestLoader()
|
||||
#suite = unittest_toolbox.unittest.TestSuite()
|
||||
|
||||
#class1_tests = loader.loadTestsFromTestCase(TestUpdater_init_)
|
||||
#class2_tests = loader.loadTestsFromTestCase(TestUpdater)
|
||||
|
||||
#suite.addTest(class1_tests)
|
||||
#suite.addTest(class2_tests)
|
||||
|
||||
#try:
|
||||
# unittest_toolbox.unittest.TextTestRunner(verbosity=2).run(suite)
|
||||
#finally:
|
||||
# # Removing repositories.
|
||||
# setup.remove_all_repositories(TestUpdater.repositories['main_repository'])
|
||||
# unittest_toolbox.Modified_TestCase.clear_toolbox()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Reference in a new issue