Esempio n. 1
0
def disable_console_log_messages():
  return repo_lib.disable_console_log_messages()
Esempio n. 2
0
import tuf.log
import tuf.formats
import tuf.roledb
import tuf.keydb
import tuf.settings

import tuf.repository_lib as repo_lib
import tuf.repository_tool as repo_tool

import securesystemslib
import securesystemslib.interface
import six

logger = logging.getLogger('tuf.test_repository_lib')

repo_lib.disable_console_log_messages()


class TestRepositoryToolFunctions(unittest.TestCase):
    @classmethod
    def setUpClass(cls):

        # setUpClass() is called before tests in an individual class are executed.

        # Create a temporary directory to store the repository, metadata, and target
        # files.  'temporary_directory' must be deleted in TearDownClass() so that
        # temporary files are always removed, even when exceptions occur.
        tuf.roledb.clear_roledb(clear_all=True)
        tuf.keydb.clear_keydb(clear_all=True)
        cls.temporary_directory = tempfile.mkdtemp(dir=os.getcwd())
    import unittest2 as unittest

import tuf
import tuf.log
import tuf.formats
import tuf.roledb
import tuf.keydb
import tuf.hash
import tuf.repository_lib as repo_lib
import tuf.repository_tool as repo_tool

import six

logger = logging.getLogger("tuf.test_repository_lib")

repo_lib.disable_console_log_messages()


class TestRepositoryToolFunctions(unittest.TestCase):
    @classmethod
    def setUpClass(cls):

        # setUpClass() is called before tests in an individual class are executed.

        # Create a temporary directory to store the repository, metadata, and target
        # files.  'temporary_directory' must be deleted in TearDownClass() so that
        # temporary files are always removed, even when exceptions occur.
        cls.temporary_directory = tempfile.mkdtemp(dir=os.getcwd())

    @classmethod
    def tearDownClass(cls):