Skip to content
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

Tdl 12262 add ticket fields stream #52

Open
wants to merge 13 commits into
base: TDL-20356-update-function-based-to-class-based
Choose a base branch
from

Conversation

prijendev
Copy link

Description of change

  • Added schema of new stream ticket_fields.
  • Added new stream ticket_fields.
  • Updated tap-tester test cases.

Manual QA steps

Risks

Rollback steps

  • revert this branch

@@ -43,7 +43,7 @@ def test_run(self):
with self.subTest(stream=stream):
# Not able to generate more data as roles stream requires pro account.
# So, updating page_sie according to data available.
if stream == "roles":
if stream == "roles" or stream == "ticket_fields":

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if stream == "roles" or stream == "ticket_fields":
if stream in ["roles", "ticket_fields"]:

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Comment on lines 46 to 47
if stream in ["roles", "ticket_fields"]:
page_size = 2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are we setting page_size=2 in the test? I could not find it in get_properties()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are setting page_size property in the base.py. It was added in the PR#51 and we have raised this pr from it. Back merge remained and that's why this change was not reflected here.

expected_streams = self.expected_streams()

# To collect "time_entries", "satisfaction_ratings" pro account is needed. Skipping them for now.
expected_streams = expected_streams - {'satisfaction_ratings', 'time_entries'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we merge these two separate lines into one?

expected_streams = self.expected_streams() - {'satisfaction_ratings', 'time_entries'}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged mentioned two lines to reduce redundancy.

"portal_cc_to": {
"type": ["null", "string"]
},
"choices": {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the type is not mentioned for choices?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the Freshdesk API documentation, choices is the list of values. But, in the actual response, we observed different types of values including a list of strings, plain object(dict), an object of the list, etc. That's why due to uncertainty in the value of this field, we kept {} as datatype and generally we keep {} in such cases.

@@ -14,6 +14,21 @@ def name():
return "tap_tester_freshdesk_start_date_test"

def test_run(self):
# Streams to verify start date tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the doc string.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added docstring to describe the test_run function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants