From 1a05d59a4d183b3e42e853378cdfa1a2d701ab92 Mon Sep 17 00:00:00 2001 From: mprahl Date: Tue, 17 Sep 2019 13:11:22 -0400 Subject: [PATCH] Use double quotes instead of single quotes --- tests/test_manage.py | 16 ++++++++-------- tests/test_utils/test_utils.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_manage.py b/tests/test_manage.py index a4fdf4a5..a684a44a 100644 --- a/tests/test_manage.py +++ b/tests/test_manage.py @@ -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] diff --git a/tests/test_utils/test_utils.py b/tests/test_utils/test_utils.py index 44d162a2..6cd5a085 100644 --- a/tests/test_utils/test_utils.py +++ b/tests/test_utils/test_utils.py @@ -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,