Merge pull request #1674 from MVrachev/pylint-more-changes

Tests: address new pylint warnings
This commit is contained in:
Jussi Kukkonen 2021-11-16 09:57:40 +02:00 committed by GitHub
commit ec285a448c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -43,6 +43,7 @@
logger = logging.getLogger(__name__)
# pylint: disable=too-many-public-methods
class TestMetadata(unittest.TestCase):
"""Tests for public API of all classes in 'tuf/api/metadata.py'."""

View file

@ -25,6 +25,7 @@
from tuf.ngclient import Updater
# pylint: disable=too-many-public-methods
class TestRefresh(unittest.TestCase):
"""Test update of top-level metadata following
'Detailed client workflow' in the specification."""
@ -81,6 +82,7 @@ def _assert_content_equals(
self, role: str, version: Optional[int] = None
) -> None:
"""Assert that local file content is the expected"""
# pylint: disable=protected-access
expected_content = self.sim._fetch_metadata(role, version)
with open(os.path.join(self.metadata_dir, f"{role}.json"), "rb") as f:
self.assertEqual(f.read(), expected_content)