forked from ijasperyang/django-survey
-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edf4e2c
commit 0978e8d
Showing
1 changed file
with
7 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,20 +15,20 @@ class TestIssue70(TestCase): | |
|
||
def setUp(self): | ||
self.survey = Survey.objects.get(id=4) | ||
print(self.survey) | ||
self.s2csv = Survey2Csv(self.survey) | ||
|
||
@override_settings(USER_DID_NOT_ANSWER="Left blank") | ||
def test_get_survey_as_csv(self): | ||
header = ( | ||
"user,Email Address,Your Name,Date,STARTS Who? What? Where?,Donations,Books Sold,Your Total Volunteer hours" | ||
" for this week,Your Volunteer Activities this week.,Included in the above hours; how many of those above " | ||
"hours were on filing,New Hires,Charitable Donations,Events held What? Where? Products gotten?" | ||
) | ||
self.expected_content = """{} | ||
adminebd,[email protected],Ed Davison,2020-02-03,Left blank,0,0,8,['Admin'; 'Calls'; 'Events'],0,Left blank,100,""".format( | ||
header | ||
content = ( | ||
"adminebd,[email protected],Ed Davison,2020-02-03,Left blank,0,0,8,['Admin'; 'Calls'; 'Events'],0," | ||
"Left blank,100," | ||
) | ||
|
||
@override_settings(USER_DID_NOT_ANSWER="Left blank") | ||
def test_get_survey_as_csv(self): | ||
self.expected_content = "{}\n{}".format(header, content) | ||
self.assertEqual(self.s2csv.survey_to_x(), self.expected_content) | ||
|
||
@override_settings(USER_DID_NOT_ANSWER=None) | ||
|