-
Notifications
You must be signed in to change notification settings - Fork 350
Feature/notification refactor p2 s #11412
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
Feature/notification refactor p2 s #11412
Conversation
|
|
||
| for guid, value in user.unclaimed_records.items(): | ||
| obj = Guid.load(guid) | ||
| url = f'{DOMAIN}legacy/user/{user._id}/{guid}/claim/?token={value["token"]}' |
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 was in the current develop, it caused the claim email tests to fail.
| validated_data, | ||
| ) | ||
|
|
||
| class NodeContributorsUpdateSerializer(ser.Serializer): |
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 was in the current develop, it caused the claim email tests to fail.
| DraftRegistrationDetailLegacySerializer, | ||
| NodeContributorsSerializer, | ||
| NodeContributorDetailSerializer, | ||
| NodeContributorsUpdateSerializer, |
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 was in the current develop, it caused the claim email tests to fail.
| def get_resource(self): | ||
| return self.get_node() | ||
|
|
||
| def get_object(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.
This was in the current develop, it caused the claim email tests to fail.
| """ | ||
| Use NodeContributorDetailSerializer which requires 'id' | ||
| """ | ||
| if self.request.method == 'PATCH' and self.request.query_params.get('copy_contributors_from_parent_project'): |
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 was in the current develop, it caused the claim email tests to fail.
| context['default_email'] = 'default' | ||
| return context | ||
|
|
||
| def patch(self, request, *args, **kwargs): |
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 was in the current develop, it caused the claim email tests to fail.
| preprint.date_last_transitioned = None | ||
| preprint.save() | ||
| payload = self.create_payload(preprint._id, trigger=trigger) | ||
| with capture_notifications(): |
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 has to covered in mocked and non-mocked state due to the parameterization of tests
| assert attributes['permission'] == permissions.WRITE | ||
| assert project.get_permissions(user) == [permissions.READ, permissions.WRITE] | ||
|
|
||
| def test_update_component_project_with_parent_contributors(self, app, user, component_project_and_parent_project): |
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 was part of develop and was causing tests to fail so had to be reverted,
api_tests/search/views/test_views.py
Outdated
| collection_public.collect_object(node_one, user) | ||
| collection_public.collect_object(node_two, user) | ||
| collection_public.collect_object(node_private, user) | ||
| with capture_notifications(): |
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.
These had to have these mocks reintroduced.
api_tests/search/views/test_views.py
Outdated
| # test_search_collections_by_submission_abstract | ||
| collection_public.collect_object(node_with_abstract, user) | ||
| registration_collection.collect_object(reg_with_abstract, user) | ||
| with capture_notifications(): |
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.
These had to have these mocks reintroduced.
api_tests/search/views/test_views.py
Outdated
| collection_public.collect_object(node_two, user, collected_type='asdf', status='lkjh') | ||
| collection_public.collect_object(node_with_abstract, user, status='asdf', grade_levels='super') | ||
| collection_public.collect_object(node_private, user, status='asdf', collected_type='asdf') | ||
| with capture_notifications(): |
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.
These had to have these mocks reintroduced.
api_tests/search/views/test_views.py
Outdated
|
|
||
| collection_public.collect_object(node_one, user, disease='illness', data_type='realness') | ||
| collection_public.collect_object(node_two, user, data_type='realness') | ||
| with capture_notifications(): |
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.
These had to have these mocks reintroduced.
| base_url = website_settings.DOMAIN if external else '/' | ||
| unclaimed_record = self.get_unclaimed_record(project_id) | ||
| token = unclaimed_record['token'] | ||
| return f'{base_url}legacy/user/{uid}/{project_id}/claim/?token={token}' |
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.
Some stuff added from develop that was causing tests to fail
| domain = settings.DOMAIN | ||
| assert ( | ||
| unreg_user.get_claim_url(pid, external=True) == | ||
| f'{domain}legacy/user/{uid}/{pid}/claim/?token={token}' |
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.
Some stuff added from develop that was causing tests to fail
| domain = settings.DOMAIN | ||
| assert ( | ||
| unreg_moderator.get_claim_url(pid, external=True) == | ||
| f'{domain}legacy/user/{uid}/{pid}/claim/?token={token}' |
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.
Some stuff added from develop that was causing tests to fail
| # user will be required to set email and password | ||
| # claim token must be present in query parameter | ||
| Rule( | ||
| ['/legacy/user/<uid>/<pid>/claim/'], |
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.
Some stuff added from develop that was causing tests to fail
| % if logo not in osf_logo_list: | ||
| <img src="https://raw.githubusercontent.com/CenterForOpenScience/osf-assets/master/files/preprints-assets/${logo}/wide_white.png" alt="OSF logo" style="border: 0;height: auto;line-height: 100%;outline: none;text-decoration: none;"> | ||
| %else: | ||
| <img src="https://osf.io/static/img/${logo' or osf_logo)}.png" alt="OSF logo" style="border: 0;height: auto;line-height: 100%;outline: none;text-decoration: none;"> |
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.
Template problems effecting the moderator templates
9ba5b23 to
6582cc1
Compare
Purpose
Revert accidental merge with develop, fixes issues with CI not running and fixes unrun tests.
Changes
QA Notes
Please make verification statements inspired by your code and what your code touches.
What are the areas of risk?
Any concerns/considerations/questions that development raised?
Documentation
Side Effects
Ticket