Skip to content

Commit

Permalink
Cleanup issue70 for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Feb 5, 2020
1 parent edf4e2c commit 0978e8d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions survey/tests/exporter/csv/test_issue70.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0978e8d

Please sign in to comment.