-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add 'Schedule Viewer' as volunteer import role (#754)
[#188743929]
- Loading branch information
1 parent
d70d107
commit d2d8ab2
Showing
6 changed files
with
61 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
import json | ||
import os | ||
import subprocess | ||
|
||
|
@@ -32,7 +33,7 @@ def get_package_name(name): | |
|
||
setup( | ||
name=get_package_name('django-donation-tracker'), | ||
version='3.3', | ||
version=json.load(open('package.json'))['version'], | ||
author='Games Done Quick', | ||
author_email='[email protected]', | ||
packages=find_packages(include=['tracker', 'tracker.*']), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -375,6 +375,8 @@ def test_send_volunteer_emails(self): | |
{{ user }} is a head donation screener. | ||
{% elif is_host %} | ||
{{ user }} is a host. | ||
{% elif is_schedule %} | ||
{{ user }} is a schedule viewer. | ||
{% else %} | ||
{{ user }} is a donation screener. | ||
{% endif %}""", | ||
|
@@ -387,6 +389,7 @@ def test_send_volunteer_emails(self): | |
"""position,name,username,email | ||
Host,Jesse Doe,Garden,[email protected] | ||
Head Donations,John Doe,Ribs,[email protected] | ||
Schedule,Jack Doe,Snakes,[email protected] | ||
Donations,Jane Doe,Apples,[email protected] | ||
Donations,Add Min,SHOULD_NOT_CHANGE,[email protected] | ||
Donations,,invalid,invalid.email.com | ||
|
@@ -405,11 +408,11 @@ def test_send_volunteer_emails(self): | |
) | ||
self.assertRedirects(response, reverse('admin:tracker_event_changelist')) | ||
self.assertEqual( | ||
emails + 5, | ||
emails + 6, | ||
post_office.models.Email.objects.count(), | ||
'Did not send five emails', | ||
'Did not send six emails', | ||
) | ||
self.assertEqual(users + 4, User.objects.count(), 'Did not add four users') | ||
self.assertEqual(users + 5, User.objects.count(), 'Did not add five users') | ||
self.super_user.refresh_from_db() | ||
self.assertTrue( | ||
Group.objects.get(name='Bid Admin') | ||
|
@@ -441,6 +444,16 @@ def test_send_volunteer_emails(self): | |
post_office.models.Email.objects.get(to='[email protected]').message, | ||
"jesse's email was not tagged as host", | ||
) | ||
self.assertIn( | ||
'Snakes is a schedule viewer.', | ||
post_office.models.Email.objects.get(to='[email protected]').message, | ||
"jack's email was not tagged as a schedule viewer", | ||
) | ||
self.assertTrue( | ||
Group.objects.get(name='Schedule Viewer') | ||
in User.objects.get(email='[email protected]').groups.all(), | ||
'jack should belong to Schedule Viewer', | ||
) | ||
self.assertTrue( | ||
Group.objects.get(name='Bid Tracker') | ||
in User.objects.get(email='[email protected]').groups.all(), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters