feat: 住所項目のテストを追加
This commit is contained in:
parent
8353a53513
commit
7a194b8585
@ -428,12 +428,10 @@ class TestSalesforceApiClient:
|
||||
"""
|
||||
Cases:
|
||||
- SOQLBuilderから生成したSOQLで、Salesforceからオブジェクトが取得できること
|
||||
- SystemModStampのFromが2000年1月1日以降のレコードが取得できること
|
||||
- SystemModStampのToが2100年12月31日未満のレコードが取得できること
|
||||
- できること
|
||||
Arranges:
|
||||
- SalesforceのAccountオブジェクトに、レコードを作成する
|
||||
- LastFetchDatetimeのFromに2000年1月1日を指定する
|
||||
- LastFetchDatetimeのToに2100年12月31日を指定する
|
||||
- SalesforceのAccountオブジェクトに、住所項目を持つレコードを作成する
|
||||
- 住所項目を持つレコードだけが取れるよう日付を設定する
|
||||
Expects:
|
||||
取得できたオブジェクト件数が1件になる
|
||||
住所項目(BillingAddress)が想定通りの値になっていること
|
||||
@ -441,8 +439,8 @@ class TestSalesforceApiClient:
|
||||
|
||||
execute_datetime = ExecuteDateTime()
|
||||
last_fetch_datetime = LastFetchDatetime({
|
||||
'last_fetch_datetime_from': '2022-08-19T05:53:29.000Z',
|
||||
'last_fetch_datetime_to': '2022-08-19T05:53:30.000Z',
|
||||
'last_fetch_datetime_from': '2022-08-23T02:38:00.000Z',
|
||||
'last_fetch_datetime_to': '2022-08-23T02:39:00.000Z',
|
||||
}, execute_datetime)
|
||||
target_object = TargetObject({
|
||||
'object_name': 'Account',
|
||||
@ -451,15 +449,15 @@ class TestSalesforceApiClient:
|
||||
'Name',
|
||||
'SystemModstamp',
|
||||
'LastModifiedDate',
|
||||
'BillingStreet',
|
||||
'BillingCity',
|
||||
'BillingState',
|
||||
'BillingPostalCode',
|
||||
'BillingCountry',
|
||||
'BillingLatitude',
|
||||
'BillingLongitude',
|
||||
'BillingGeocodeAccuracy',
|
||||
'BillingAddress',
|
||||
'CustomItem1__c',
|
||||
'CustomItem2__c',
|
||||
'CustomItem3__c',
|
||||
'CustomItem4__c',
|
||||
'CustomItem5__c',
|
||||
'CustomItem6__c',
|
||||
'CustomItem7__c',
|
||||
'CustomItem8__c'
|
||||
]
|
||||
}, execute_datetime)
|
||||
soql_builder = SOQLBuilder(target_object, last_fetch_datetime)
|
||||
@ -480,6 +478,14 @@ class TestSalesforceApiClient:
|
||||
])
|
||||
|
||||
assert actual[0]['BillingAddress'] == expect_address
|
||||
assert actual[0]['BillingCity'] == '〇〇区'
|
||||
assert actual[0]['BillingCountry'] == '日本'
|
||||
assert actual[0]['BillingGeocodeAccuracy'] is None
|
||||
assert actual[0]['BillingLatitude'] is None
|
||||
assert actual[0]['BillingLongitude'] is None
|
||||
assert actual[0]['BillingPostalCode'] == '999-9999'
|
||||
assert actual[0]['BillingState'] == '東京都'
|
||||
assert actual[0]['BillingStreet'] == '△△-✗✗'
|
||||
|
||||
def test_fetch_sf_data_by_soql_builder_system_modstamp_all_range(self):
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user