Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/test_fossology_license.py
# Copyright (C) 2017-2018 The Software Heritage developers | # Copyright (C) 2017-2018 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import unittest | import unittest | ||||
from unittest.mock import patch | from unittest.mock import patch | ||||
from swh.indexer.fossology_license import ( | from swh.indexer.fossology_license import ( | ||||
FossologyLicenseIndexer, FossologyLicenseRangeIndexer, | FossologyLicenseIndexer, FossologyLicenseRangeIndexer, | ||||
compute_license | compute_license | ||||
) | ) | ||||
from swh.indexer.tests.test_utils import ( | from swh.indexer.tests.utils import ( | ||||
SHA1_TO_LICENSES, CommonContentIndexerTest, CommonContentIndexerRangeTest, | SHA1_TO_LICENSES, CommonContentIndexerTest, CommonContentIndexerRangeTest, | ||||
CommonIndexerWithErrorsTest, CommonIndexerNoTool, NoDiskIndexer, | CommonIndexerWithErrorsTest, CommonIndexerNoTool, NoDiskIndexer, | ||||
BASE_TEST_CONFIG, fill_storage, fill_obj_storage | BASE_TEST_CONFIG, fill_storage, fill_obj_storage | ||||
) | ) | ||||
class BasicTest(unittest.TestCase): | class BasicTest(unittest.TestCase): | ||||
@patch('swh.indexer.fossology_license.subprocess') | @patch('swh.indexer.fossology_license.subprocess') | ||||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |