Skip to content

Commit

Permalink
Formatting changes in client.py and bookmark key change in interrupt …
Browse files Browse the repository at this point in the history
…sync test
  • Loading branch information
sgandhi1311 committed Feb 15, 2023
1 parent b3071bb commit 8cd3259
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions tests/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,13 +680,9 @@ def get_tickets(self):
while True:
response = self.get(url, params=params)

records.extend(
[
record
records.extend([record
for record in response["results"]
if record[replication_key] >= self.start_date_strf.replace('.Z', '.000Z')
]
)
if record[replication_key] >= self.start_date_strf.replace('.Z', '.000Z')])

if not response.get("paging"):
break
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hubspot_interrupted_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def simulated_interruption(self, reference_state):
new_state['bookmarks']['engagements']['current_sync_start'] = engagements_bookmark

tickets_bookmark = self.timedelta_formatted(
reference_state['bookmarks']['engagements']['lastUpdated'],
reference_state['bookmarks']['tickets']['lastUpdated'],
days=-1, str_format=self.BASIC_DATE_FORMAT
)
new_state['bookmarks']['tickets']['updatedAt'] = tickets_bookmark
Expand Down

0 comments on commit 8cd3259

Please sign in to comment.