ARMmbed/mbed-targets

View on GitHub

Showing 2 of 14 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

@requests_mock.mock()
@mock.patch("mbed_targets._internal.board_database.logger.warning", autospec=True)
@mock.patch("mbed_targets._internal.board_database.logger.debug", autospec=True)
def test_404(self, mock_request, logger_debug, logger_warning):
"""Given a 404 error code, TargetAPIError is raised."""
Severity: Major
Found in tests/_internal/test_board_database.py and 1 other location - About 7 hrs to fix
tests/_internal/test_board_database.py on lines 19..28

Similar blocks of code found in 2 locations. Consider refactoring.
Open

@requests_mock.mock()
@mock.patch("mbed_targets._internal.board_database.logger.warning", autospec=True)
@mock.patch("mbed_targets._internal.board_database.logger.debug", autospec=True)
def test_401(self, mock_request, logger_debug, logger_warning):
"""Given a 401 error code, BoardAPIError is raised."""
Severity: Major
Found in tests/_internal/test_board_database.py and 1 other location - About 7 hrs to fix
tests/_internal/test_board_database.py on lines 30..39
Severity
Category
Status
Source
Language