Skip to content

Commit 566cccb

Browse files
committed
fix template tests
1 parent efee288 commit 566cccb

6 files changed

Lines changed: 18 additions & 15 deletions

File tree

api/institutions/authentication.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ def authenticate(self, request):
355355
).emit(
356356
user=user,
357357
event_context={
358+
'user_fullname': user.fullname,
358359
'email_to_add': email_to_add,
359360
'domain': DOMAIN,
360361
'osf_support_email': OSF_SUPPORT_EMAIL,

api/nodes/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,7 @@ def perform_create(self, serializer):
10511051
user=user,
10521052
subscribed_object=node,
10531053
event_context={
1054+
'domain': settings.DOMAIN,
10541055
'guid': fork._id,
10551056
'node_title': node.title,
10561057
'node__id': node._id,
@@ -1065,6 +1066,7 @@ def perform_create(self, serializer):
10651066
user=user,
10661067
subscribed_object=node,
10671068
event_context={
1069+
'domain': settings.DOMAIN,
10681070
'guid': fork._id,
10691071
'node_title': node.title,
10701072
'node__id': node._id,

osf_tests/metadata/test_osf_gathering.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ def setUpTestData(cls):
101101
creator=cls.user__admin,
102102
is_public=True,
103103
)
104-
cls.preprint.add_contributor(cls.user__readwrite, permissions=permissions.WRITE)
105-
cls.preprint.add_contributor(cls.user__readonly, permissions=permissions.READ)
106-
cls.preprint.add_contributor(cls.user__invisible, permissions=permissions.WRITE, visible=False)
104+
cls.preprint.add_contributor(cls.user__readwrite, permissions=permissions.WRITE, notification_type=False)
105+
cls.preprint.add_contributor(cls.user__readonly, permissions=permissions.READ, notification_type=False)
106+
cls.preprint.add_contributor(cls.user__invisible, permissions=permissions.WRITE, visible=False, notification_type=False)
107107
cls.registration_cedar_record = factories.CedarMetadataRecordFactory(
108108
template=cls.cedar_template,
109109
is_published=True,

website/templates/emails/confirm_moderation.html.mako

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<td style="border-collapse: collapse;">
66
Hello ${user_fullname},<br>
77
<br>
8-
You have been added by ${referrer_fullname}, as ${'an administrator' if is_admin else 'a moderator'} to ${provider.name}, powered by OSF. To set a password for your account, visit:<br>
8+
You have been added by ${referrer_fullname}, as ${'an administrator' if is_admin else 'a moderator'} to ${provider_name}, powered by OSF. To set a password for your account, visit:<br>
99
<br>
1010
${claim_url}<br>
1111
<br>
12-
Once you have set a password you will be able to moderate, create and approve your own submissions. You will automatically be subscribed to notification emails for new submissions to ${provider.name}.<br>
12+
Once you have set a password you will be able to moderate, create and approve your own submissions. You will automatically be subscribed to notification emails for new submissions to ${provider_name}.<br>
1313
<br>
14-
If you are not ${user_fullname} or you have been erroneously associated with ${provider.name}, email contact+${provider._id}@osf.io with the subject line "Claiming error" to report the problem.<br>
14+
If you are not ${user_fullname} or you have been erroneously associated with ${provider_name}, email contact+${provider__id}@osf.io with the subject line "Claiming error" to report the problem.<br>
1515
<br>
1616
Sincerely,<br>
17-
Your ${provider.name} and OSF teams<br>
17+
Your ${provider_name} and OSF teams<br>
1818
</tr>
1919
</%def>

website/templates/emails/moderator_added.html.mako

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<td style="border-collapse: collapse;">
66
Hello ${user_fullname},<br>
77
<br>
8-
You have been added by ${referrer_fullname} as ${'an administrator' if is_admin else 'a moderator'} to ${provider.name}, powered by OSF.<br>
8+
You have been added by ${referrer_fullname} as ${'an administrator' if is_admin else 'a moderator'} to ${provider_name}, powered by OSF.<br>
99
<br>
10-
You will automatically be subscribed to notification emails for new submissions to ${provider.name}.<br>
10+
You will automatically be subscribed to notification emails for new submissions to ${provider_name}.<br>
1111
<br>
12-
If you are not ${user_fullname} or you have been erroneously associated with ${provider.name}, email contact+${provider._id}@osf.io with the subject line "Claiming Error" to report the problem.<br>
12+
If you are not ${user_fullname} or you have been erroneously associated with ${provider_name}, email contact+${provider__id}@osf.io with the subject line "Claiming Error" to report the problem.<br>
1313
<br>
1414
Sincerely,<br>
1515
<br>
16-
Your ${provider.name} and OSF teams<br>
16+
Your ${provider_name} and OSF teams<br>
1717
</tr>
1818
</%def>

website/templates/project/project.mako

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,15 +550,15 @@
550550
% if preprint['state'] == 'pending':
551551
% if preprint['provider']['workflow'] == 'post-moderation':
552552
<% icon_tooltip = 'This {preprint_word} is publicly available and searchable but is subject to' \
553-
' removal by a moderator.'.format(preprint_word=preprint['word'])%>
553+
' removal by a moderator.'%>
554554
% else:
555555
<% icon_tooltip = 'This {preprint_word} is not publicly available or searchable until approved ' \
556-
'by a moderator.'.format(preprint_word=preprint['word'])%>
556+
'by a moderator.' %>
557557
% endif
558558
% elif preprint['state'] == 'accepted':
559-
<% icon_tooltip = 'This {preprint_word} is publicly available and searchable.'.format(preprint_word=preprint['word'])%>
559+
<% icon_tooltip = 'This {preprint_word} is publicly available and searchable.' %>
560560
% else:
561-
<% icon_tooltip = 'This {preprint_word} is not publicly available or searchable.'.format(preprint_word=preprint['word'])%>
561+
<% icon_tooltip = 'This {preprint_word} is not publicly available or searchable.' %>
562562
% endif
563563
<i class="fa fa-question-circle text-muted" data-toggle="tooltip" data-placement="bottom" title="${icon_tooltip}"></i>
564564
% endif

0 commit comments

Comments
 (0)