def test_get_headers(self):
        column = SplitExportColumn(
            item=MultipleChoiceItem(
                path=[PathNode(name="form"), PathNode(name="mc")], options=[Option(value="foo"), Option(value="bar")]
            ),
            label="form.mc",
        )
        result = column.get_headers(split_column=True)
        self.assertEqual(result, ["form.mc | foo", "form.mc | bar", "form.mc | extra"])

        result = column.get_headers(split_column=False)
        self.assertEqual(result, ["form.mc"])
    def test_get_headers(self):
        column = SplitExportColumn(item=MultipleChoiceItem(
            path=[PathNode(name='form'),
                  PathNode(name='mc')],
            options=[Option(value="foo"),
                     Option(value="bar")]),
                                   label='form.mc')
        result = column.get_headers(split_column=True)
        self.assertEqual(result,
                         ['form.mc | foo', 'form.mc | bar', 'form.mc | extra'])

        result = column.get_headers(split_column=False)
        self.assertEqual(result, ['form.mc'])
 def test_basic_get_headers(self):
     column = SplitExportColumn(
         label="Fruit",
         item=MultipleChoiceItem(options=[Option(value="Apple"), Option(value="Banana")]),
         ignore_unspecified_options=True,
     )
     self.assertEqual(column.get_headers(split_column=True), ["Fruit | Apple", "Fruit | Banana"])
 def test_get_headers_with_extras(self):
     column = SplitExportColumn(
         label="Fruit - {option}",
         item=MultipleChoiceItem(options=[Option(value="Apple"), Option(value="Banana")]),
         ignore_unspecified_options=False,
     )
     self.assertEqual(column.get_headers(split_column=True), ["Fruit - Apple", "Fruit - Banana", "Fruit - extra"])
 def test_get_headers_with_template_string(self):
     column = SplitExportColumn(
         label="Fruit - {option}",
         item=MultipleChoiceItem(
             options=[Option(value='Apple'), Option(value='Banana')]
         ),
         ignore_unspecified_options=True
     )
     self.assertEqual(column.get_headers(split_column=True), ["Fruit - Apple", "Fruit - Banana"])
 def test_get_headers_with_extras(self):
     column = SplitExportColumn(
         label="Fruit - {option}",
         item=MultipleChoiceItem(
             options=[Option(value='Apple'),
                      Option(value='Banana')]),
         ignore_unspecified_options=False)
     self.assertEqual(column.get_headers(split_column=True),
                      ["Fruit - Apple", "Fruit - Banana", "Fruit - extra"])
 def test_basic_get_headers(self):
     column = SplitExportColumn(
         label="Fruit",
         item=MultipleChoiceItem(
             options=[Option(value='Apple'),
                      Option(value='Banana')]),
         ignore_unspecified_options=True)
     self.assertEqual(column.get_headers(split_column=True),
                      ["Fruit | Apple", "Fruit | Banana"])