def test_list_to_str_3(self):
     """Test non empty fields"""
     from ExportIndicators import list_to_str
     valid_list_value = [1, 2, 3, 4]
     assert list_to_str(valid_list_value) == '1,2,3,4'
     assert list_to_str(valid_list_value, '.') == '1.2.3.4'
     assert list_to_str(valid_list_value, map_func=lambda x: f'{x}a') == '1a,2a,3a,4a'
    def test_list_to_str_1(self):
        """Test invalid"""
        from ExportIndicators import list_to_str
        with pytest.raises(AttributeError):
            invalid_list_value = 2
            list_to_str(invalid_list_value)

        with pytest.raises(AttributeError):
            invalid_list_value = {'invalid': 'invalid'}
            list_to_str(invalid_list_value)
 def test_list_to_str_2(self):
     """Test empty"""
     from ExportIndicators import list_to_str
     assert list_to_str(None) == ''
     assert list_to_str([]) == ''
     assert list_to_str({}) == ''