mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 11:48:33 +08:00
Fix Flake8 errors
This commit is contained in:
@@ -593,7 +593,6 @@ def _fetch_mmd(url, branch=None, allow_local_url=False, whitelist_url=False):
|
||||
else:
|
||||
mmd.version = int(scm.version)
|
||||
|
||||
|
||||
return mmd, scm
|
||||
|
||||
|
||||
@@ -836,8 +835,6 @@ def merge_included_mmd(mmd, included_mmd):
|
||||
|
||||
def record_component_builds(mmd, module, initial_batch=1,
|
||||
previous_buildorder=None, main_mmd=None, session=None):
|
||||
import koji # Placed here to avoid py2/py3 conflicts...
|
||||
|
||||
if not session:
|
||||
session = db.session
|
||||
|
||||
|
||||
@@ -939,8 +939,8 @@ class TestBuild(unittest.TestCase):
|
||||
|
||||
# Resubmit the failed module
|
||||
rv = self.client.post('/module-build-service/1/module-builds/', data=json.dumps(
|
||||
{'branch': 'master', 'scmurl': 'git://pkgs.stg.fedoraproject.org/modules/'
|
||||
'testmodule.git?#7fea453'}))
|
||||
{'branch': 'master', 'scmurl': ('git://pkgs.stg.fedoraproject.org/modules/'
|
||||
'testmodule.git?#7fea453')}))
|
||||
|
||||
FakeModuleBuilder.BUILD_STATE = 'BUILDING'
|
||||
FakeModuleBuilder.INSTANT_COMPLETE = True
|
||||
|
||||
@@ -21,12 +21,11 @@
|
||||
# Written by Jan Kaluza <jkaluza@redhat.com>
|
||||
|
||||
import unittest
|
||||
import koji
|
||||
|
||||
import module_build_service.models
|
||||
import module_build_service.builder
|
||||
|
||||
from tests import conf, init_data, db
|
||||
from tests import init_data, db
|
||||
|
||||
from module_build_service.builder import GenericBuilder
|
||||
from mock import patch
|
||||
|
||||
@@ -25,7 +25,7 @@ import unittest
|
||||
from mock import patch, PropertyMock
|
||||
import vcr
|
||||
|
||||
from tests import conf, db, clean_database
|
||||
from tests import conf, clean_database
|
||||
from tests.test_views.test_views import FakeSCM
|
||||
import module_build_service.messaging
|
||||
import module_build_service.scheduler.handlers.modules
|
||||
|
||||
@@ -533,7 +533,7 @@ class TestViews(unittest.TestCase):
|
||||
|
||||
rv = self.client.post('/module-build-service/1/module-builds/', data=json.dumps(
|
||||
{'branch': 'master', 'rebuild_strategy': 'only-changed',
|
||||
'scmurl': ('git://pkgs.stg.fedoraproject.org/modules/testmodule.git?'
|
||||
'scmurl': ('git://pkgs.stg.fedoraproject.org/modules/testmodule.git?'
|
||||
'#68931c90de214d9d13feefbd35246a81b6cb8d49')}))
|
||||
data = json.loads(rv.data)
|
||||
self.assertEqual(rv.status_code, 400)
|
||||
|
||||
Reference in New Issue
Block a user