Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion donations/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_donation_api_get(self):
class ThankYouNoteTest(APITestCase, TestCase):

def test_thank_you_note_api_post(self):
data = {"thank_you_note":"OpenStax is the best! Loved not paying for a book", "last_name": "Drew", "first_name": "Jessica", "institution": "Rice University", "consent_to_share_or_contact": "True", "contact_email_address": "jess@example.com", "source": "PDF download"}
data = {"thank_you_note":"OpenStax is the best! Loved not paying for a book", "last_name": "Drew", "first_name": "Jessica", "school": "Rice University", "consent_to_share_or_contact": "True", "contact_email_address": "jess@example.com", "source": "PDF download"}
response = self.client.post('/apps/cms/api/donations/thankyounote/', data, format='json')
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
tyn = ThankYouNote.objects.filter(last_name='Drew').values()
Expand Down
2 changes: 1 addition & 1 deletion donations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def post(self, request):
thank_you_note = request.data['thank_you_note']
first_name = request.data['first_name']
last_name = request.data['last_name']
institution = request.data['institution']
institution = request.data['school']
consent_to_share_or_contact = request.data.get('consent_to_share_or_contact', False)
contact_email_address = request.data.get('contact_email_address', '')
source = request.data.get('source', '')
Expand Down