Use double quotes instead of single quotes

This commit is contained in:
mprahl
2019-09-17 13:11:22 -04:00
parent 065abe3c45
commit 1a05d59a4d
2 changed files with 9 additions and 9 deletions

View File

@@ -136,24 +136,24 @@ class TestMBSManage:
clean_database()
cli_cmd = [
'mbs-manager', 'build_module_locally',
'--set-stream', 'platform:f28',
"--file", staged_data_filename('testmodule-local-build.yaml')
"mbs-manager", "build_module_locally",
"--set-stream", "platform:f28",
"--file", staged_data_filename("testmodule-local-build.yaml")
]
# build_module_locally changes database uri to a local SQLite database file.
# Restore the uri to original one in order to not impact the database
# session in subsequent tests.
original_db_uri = app.config['SQLALCHEMY_DATABASE_URI']
original_db_uri = app.config["SQLALCHEMY_DATABASE_URI"]
try:
# The local sqlite3 database created by function
# build_module_locally is useless for this test. Mock the
# db.create_call to stop to create that database file.
with patch('module_build_service.manage.db.create_all'):
with patch('sys.argv', new=cli_cmd):
with patch("module_build_service.manage.db.create_all"):
with patch("sys.argv", new=cli_cmd):
manager_wrapper()
finally:
app.config['SQLALCHEMY_DATABASE_URI'] = original_db_uri
app.config["SQLALCHEMY_DATABASE_URI"] = original_db_uri
# Since module_build_service.scheduler.main is mocked, MBS does not
# really build the testmodule for this test. Following lines assert the
@@ -165,7 +165,7 @@ class TestMBSManage:
# --set-stream, which is the point this test tests.
builds = db_session.query(models.ModuleBuild).filter_by(
name='testmodule-local-build').all()
name="testmodule-local-build").all()
assert 1 == len(builds)
testmodule_build = builds[0]

View File

@@ -1616,7 +1616,7 @@ class TestUtilsModuleReuse:
assert reusable_module.id == build_module.reused_module_id
assert reusable_module.id == reused_module.id
@pytest.mark.parametrize('allow_ocbm', (True, False))
@pytest.mark.parametrize("allow_ocbm", (True, False))
@patch(
"module_build_service.config.Config.allow_only_compatible_base_modules",
new_callable=mock.PropertyMock,