示例#1
0
 def test_prepare_field_to_row_sessions(self):
     attendee = mommy.prepare(
         ConferenceRegistration,
         sessions='["Morning", "Afternoon"]'
     )
     self.assertEqual(
         ConferenceExporter.prepare_field(attendee, 'sessions'),
         'Morning,Afternoon'
     )
示例#2
0
 def test_prepare_field_to_row_unicode(self):
     attendee = mommy.prepare(
         ConferenceRegistration,
         organization=u'Citro\xebn'
     )
     self.assertEqual(
         ConferenceExporter.prepare_field(attendee, 'organization'),
         'Citro\xc3\xabn'
     )
 def test_prepare_field_to_row_no_sessions(self):
     attendee = mommy.prepare(ConferenceRegistration, sessions='')
     self.assertEqual(
         ConferenceExporter.prepare_field(attendee, 'sessions'), '')
 def test_prepare_field_to_row_no_sessions(self):
     attendee = mommy.prepare(ConferenceRegistration, sessions='')
     self.assertEqual(
         ConferenceExporter.prepare_field(attendee, 'sessions'),
         ''
     )