fix: Userオブジェクトの連携対象外カラムが正式対応されたので修正した
This commit is contained in:
parent
96b9b80e40
commit
baee5b4142
@ -73,7 +73,6 @@ def test_walk_through(s3_test, s3_client, monkeypatch, caplog):
|
||||
object_info_list = get_object_config_list('object_info')
|
||||
for object_info in object_info_list:
|
||||
json_file = read_json(object_info)
|
||||
json_file = to_upload_json(json_file)
|
||||
upload_json(json_file, s3_client, CONFIG_BUCKET, f'{OBJECT_INFO_FOLDER}/{path.basename(object_info)}')
|
||||
object_info_files.append(json_file)
|
||||
last_fetch_datetime_list = get_object_config_list('last_fetch_datetime')
|
||||
@ -295,21 +294,6 @@ def upload_json(json_file, s3_client, bucket, folder):
|
||||
s3_client.put_object(Bucket=bucket, Key=folder, Body=json_str)
|
||||
|
||||
|
||||
def to_upload_json(json_file):
|
||||
"""Userオブジェクトの取得できないプロパティを取り除く
|
||||
TODO: Userオブジェクトの恒久対応が確定したらこのメソッドは消す
|
||||
"""
|
||||
for object_info in json_file['objects']:
|
||||
if object_info['object_name'] != 'User':
|
||||
continue
|
||||
columns: list = object_info['columns']
|
||||
columns.remove('LastPasswordChangeDate')
|
||||
columns.remove('NumberOfFailedLogins')
|
||||
columns.remove('UserPreferencesNativeEmailClient')
|
||||
|
||||
return json_file
|
||||
|
||||
|
||||
def set_environment(monkeypatch):
|
||||
# 環境変数を設定(CRMの認証情報は別途設定しておくこと)
|
||||
monkeypatch.setattr('src.aws.s3.IMPORT_DATA_BUCKET', DATA_BUCKET)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user