Example #1
0
 def test_get_header(self, field_names_to_extract):
     field_names_to_extract.return_value = [
         "episode_id", "name", "consistency_token", "id"
     ]
     renderer = extract.EpisodeSubrecordCsvRenderer(
         Colour, models.Episode.objects.all(), self.user)
     self.assertEqual(["Patient", "Episode", "Name"],
                      renderer.get_headers())
Example #2
0
 def test_get_row(self, field_names_to_extract):
     field_names_to_extract.return_value = [
         "episode_id", "name", "consistency_token", "id"
     ]
     renderer = extract.EpisodeSubrecordCsvRenderer(
         Colour, models.Episode.objects.all(), self.user)
     rendered = renderer.get_row(self.colour)
     self.assertEqual(["1", "1", "blue"], rendered)