-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration tests for newly added tickets stream #219
Integration tests for newly added tickets stream #219
Conversation
…ger-io/tap-hubspot into integration-tests-tickets-stream
…ger-io/tap-hubspot into integration-tests-tickets-stream
…ger-io/tap-hubspot into integration-tests-tickets-stream
tests/client.py
Outdated
records.extend( | ||
[ | ||
record | ||
for record in response["results"] | ||
if record[replication_key] >= self.start_date_strf.replace('.Z', '.000Z') | ||
] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
records.extend( | |
[ | |
record | |
for record in response["results"] | |
if record[replication_key] >= self.start_date_strf.replace('.Z', '.000Z') | |
] | |
) | |
records.extend([record | |
for record in response["results"] | |
if record[replication_key] >= self.start_date_strf.replace('.Z', '.000Z')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code has mix coding styles but for list comprehession lets use above style like used elsewhere in the same file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
tickets_bookmark = self.timedelta_formatted( | ||
reference_state['bookmarks']['engagements']['lastUpdated'], | ||
days=-1, str_format=self.BASIC_DATE_FORMAT | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tickets_bookmark = self.timedelta_formatted( | |
reference_state['bookmarks']['engagements']['lastUpdated'], | |
days=-1, str_format=self.BASIC_DATE_FORMAT | |
) | |
tickets_bookmark = self.timedelta_formatted( | |
reference_state['bookmarks']['engagements']['lastUpdated'], | |
days=-1, str_format=self.BASIC_DATE_FORMAT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also why are we handlling tickets
stream separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are setting the bookmark value for tickets stream in this way. Followed the existing pattern.
8cd3259
to
d7d3f1a
Compare
d7d3f1a
to
072f126
Compare
* created the tickets schema file * introduced new stream tickets in the hubspot tap implementation * Changes in tickets stream implementation * pylint issues fixed * pylint issues * added unit test to test sync_tickets * Added unit test cases in test_tickets.py * refactoring * added null as one of the types for the non-primary fields in tickets stream schema * added object type in tickets.json * addressed PR comments * removed spaces in tickets.json * changes in tickets.json file * added new line at the end * changed type from integer to string of some of the fields * add logic to transform the records * Integration tests for newly added tickets stream (#219) * add tickets stream in base.py file * get ticket records * add create ticket function for integration test case * test tickets stream in interrupt sync mode * Changes: - add page limit - add functions to get, create, and update the tickets stream * modify get logic for tickets in client.py and update sync offset test * address review comments and reformat the client.py as per the standards * Formatting changes in client.py and bookmark key change in interrupt sync test * bump related changes --------- Co-authored-by: Sourabh Gandhi <[email protected]>
Description of change
Note - Dependent on #https://github.com/stitchdata/environments/pull/764
Manual QA steps
Risks
Rollback steps