From 454d9edf4dbd16df44a3bd5becdac4750850cedc Mon Sep 17 00:00:00 2001 From: yuzhipeng Date: Sat, 28 May 2022 08:36:41 +0800 Subject: [PATCH] Fix test error and add yuzp1996 to default_data.json Add yuzp1996 to default_data.json. Fix bug that test can not pass because of six is no longer support in Python3 so I delete the moudle six and delete the related logic. Signed-off-by: yuzhipeng --- default_data.json | 11 +++++++++++ tests/test_config_files.py | 7 +------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/default_data.json b/default_data.json index 23620ac..f83bd0b 100644 --- a/default_data.json +++ b/default_data.json @@ -36522,6 +36522,17 @@ "user_name": "Wenzhi Yu", "emails": ["wenzhi_yu@163.com", "yuywz@cn.ibm.com"] }, + { + "github_id": "yuzp1996", + "companies": [ + { + "company_name": "Alauda", + "end_date": null + } + ], + "user_name": "yuzhipeng", + "emails": ["yuzp1996@gmail.com", "zpyu@alauda.io", "yuzp1996@qq.com"] + }, { "github_id": "yxpoke", "companies": [ diff --git a/tests/test_config_files.py b/tests/test_config_files.py index 411f542..07b9b37 100644 --- a/tests/test_config_files.py +++ b/tests/test_config_files.py @@ -13,11 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import functools import json import jsonschema -import six import testtools DEFAULT_DATA_JSON_PATH = 'default_data.json' @@ -50,10 +48,7 @@ def dict_raise_on_duplicates(ordered_pairs): class TestConfigFiles(testtools.TestCase): def _read_raw_file(self, file_name): - if six.PY3: - opener = functools.partial(open, encoding='utf8') - else: - opener = open + opener = open with opener(file_name, 'r') as content_file: return content_file.read()