Skip to content

Commit

Permalink
Removed the time_difference variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bhuvana-talend committed Nov 8, 2023
1 parent d67f61b commit a4a70bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class TestClient():
V3_DEALS_PROPERTY_PREFIXES = {'hs_date_entered', 'hs_date_exited', 'hs_time_in'}
BOOKMARK_DATE_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
record_create_times = {}
time_difference=[]

##########################################################################
### CORE METHODS
Expand Down Expand Up @@ -761,8 +760,9 @@ def create(self, stream, company_ids=[], subscriptions=[], times=1):
elif stream == 'workflows':
return self.create_workflows()
elif stream == 'contacts':
if stream not in self.record_create_times.keys():
self.record_create_times[stream]=[]
records = self.create_contacts()
self.record_create_times[stream]=self.time_difference
return records
elif stream == 'deal_pipelines':
return self.create_deal_pipelines()
Expand Down Expand Up @@ -843,7 +843,7 @@ def create_contacts(self):
created_time = get_resp.get('properties').get('createdate').get('value')
ts=int(created_time)/1000
LOGGER.info("Created Time %s", datetime.datetime.utcfromtimestamp(ts))
self.time_difference.append(ts-seconds)
self.record_create_times["contacts"].append(ts-seconds)

converted_versionTimestamp = self.BaseTest.datetime_from_timestamp(
get_resp['versionTimestamp'] / 1000, self.BOOKMARK_DATE_FORMAT
Expand Down
1 change: 0 additions & 1 deletion tests/test_hubspot_bookmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def create_test_data(self, expected_streams):
self.expected_records = {stream: []
for stream in expected_streams}
for stream in expected_streams - {'contacts_by_company'}:
self.time_difference =[]
if stream == 'contacts':
self.times=10
else:
Expand Down

0 comments on commit a4a70bf

Please sign in to comment.