-
Couldn't load subscription status.
- Fork 343
Implement get_config and all SHA certificate-related methods #217
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
Conversation
…after making the RPC (a RequestException can be raised).
…name for both platforms.
…after making the RPC (a RequestException can be raised).
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.
Looks mostly good. I think we should start working on unit tests now to take advantage of CI.
| """Android-specific information about an Android Firebase app.""" | ||
| | ||
| def __init__(self, name, app_id, display_name, project_id, package_name): | ||
| def __init__(self, package_name, name, app_id, display_name, project_id): |
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.
It seems to me the argument order you had earlier is the more appropriate one. Commons args followed by more type specific args.
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.
I actually wanted to leave it as the last argument as well, but then I will have trouble in _get_app_metadata in line 498 because there the parameter name would be different between iOS and Android, forcing me to pass it as the first positional argument and the rest as keyword arguments (which must follow positional arguments). On the other hand, I can remove keywords from all the other arguments. Please let me know if you have any suggestions.
| platform_resource_name=_ProjectManagementService.ANDROID_APPS_RESOURCE_NAME, | ||
| app_class=AndroidApp) | ||
| | ||
| def list_ios_apps(self): |
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.
What if we drop these platform-specific helper functions and directly call _list_apps() where it's needed? Same for others?
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 is to avoid the clutter that would otherwise appear at the module level. This way, I am able to localize the long list of platform-specific constants into the _ProjectManagementService class.
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.
LGTM with one nit. Please make the change before merge.
| assert client_info['android_client_info']['package_name'] == TEST_APP_PACKAGE_NAME | ||
| break | ||
| else: | ||
| assert False, 'Failed to find the test Android app in the Android config.' |
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.
pytest.fail(....)
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.
Thanks. Done.
This PR concludes the main implementation work of the
project_managementmodule. New integration tests have been added to cover these new functionalities.The final few upcoming PRs will add a unit test suite for the
project_managementmodule.