Fix flake8 errors

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
This commit is contained in:
Michal Konečný 2022-03-21 13:44:45 +01:00
parent 6e69a65ce0
commit a8dca5908f
9 changed files with 45 additions and 38 deletions

View file

@ -2,21 +2,22 @@
Unit tests for `toddlers.plugins.scm_request_processor`
"""
import json
from unittest.mock import call, patch, MagicMock, Mock
import logging
import re
from unittest.mock import call, MagicMock, Mock, patch
import arrow
from pagure_messages.issue_schema import IssueNewV1
import pytest
import toddlers.plugins.scm_request_processor as scm_request_processor
from toddlers.exceptions import ValidationError
import toddlers.plugins.scm_request_processor as scm_request_processor
class TestAcceptsTopic:
"""
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.accepts_topic` method.
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.accepts_topic`
method.
"""
toddler_cls = scm_request_processor.SCMRequestProcessor
@ -146,7 +147,8 @@ class TestProcess:
class TestProcessTicket:
"""
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.process_ticket` method.
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.process_ticket`
method.
"""
def setup(self):
@ -488,7 +490,8 @@ class TestVerifySLAs:
class TestCreateNewRepo:
"""
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.create_new_repo` method.
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.create_new_repo`
method.
"""
def setup(self):
@ -649,7 +652,8 @@ class TestCreateNewRepo:
def test_create_new_repo_requester_not_in_dist_git(self):
"""
Assert that ticket will be commented on when requester doesn't have a valid dist git account.
Assert that ticket will be commented on when requester doesn't
have a valid dist git account.
"""
issue = {"id": 100, "user": {"name": "zlopez"}}
@ -922,7 +926,8 @@ class TestCreateNewRepo:
@patch("toddlers.plugins.scm_request_processor.pdc")
def test_create_new_repo_tests_namespace(self, mock_pdc):
"""
Assert that ticket will be processed when everything is in order and namespace is set to tests.
Assert that ticket will be processed when everything is in order and namespace
is set to tests.
"""
issue = {"id": 100, "user": {"name": "zlopez"}}
@ -979,7 +984,8 @@ class TestCreateNewRepo:
@patch("toddlers.plugins.scm_request_processor.pdc")
def test_create_new_repo_non_default_branch(self, mock_pdc):
"""
Assert that ticket will be processed when everything is in order and requested branch is not default.
Assert that ticket will be processed when everything is in order and requested
branch is not default.
"""
issue = {"id": 100, "user": {"name": "zlopez"}}
@ -1128,7 +1134,8 @@ class TestCreateNewRepo:
class TestCreateNewBranch:
"""
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.create_new_branch` method.
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.create_new_branch`
method.
"""
def setup(self):
@ -1660,7 +1667,8 @@ class TestCreateNewBranch:
class TestValidateReviewBug:
"""
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.validate_review_bug` method.
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.validate_review_bug`
method.
"""
def setup(self):
@ -2398,7 +2406,8 @@ class TestValidateReviewBug:
class TestValidEpelPackage:
"""
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.valid_epel_package` method.
Test class for `toddlers.plugins.scm_request_processor.SCMRequestProcessor.valid_epel_package`
method.
"""
def setup(self):