Skip to content

Commit 0f2b8ea

Browse files
committed
add failing test case for PYTHON-1008
error occurs when there are unicode values in options map other at keys other than `'target'` and `'class_name'`.
1 parent 3a1790b commit 0f2b8ea

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/unit/test_metadata.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import unittest # noqa
1919

2020
from binascii import unhexlify
21+
import logging
2122
from mock import Mock
2223
import os
2324
import six
@@ -38,6 +39,9 @@
3839
from cassandra.pool import Host
3940

4041

42+
log = logging.getLogger(__name__)
43+
44+
4145
class StrategiesTest(unittest.TestCase):
4246

4347
@classmethod
@@ -536,9 +540,12 @@ def test_column_name_multiple_partition(self):
536540

537541
def test_index(self):
538542
im = IndexMetadata(self.name, self.name, self.name, kind='', index_options={'target': self.name})
539-
im.export_as_string()
543+
log.debug(im.export_as_string())
540544
im = IndexMetadata(self.name, self.name, self.name, kind='CUSTOM', index_options={'target': self.name, 'class_name': 'Class'})
541-
im.export_as_string()
545+
log.debug(im.export_as_string())
546+
# PYTHON-1008
547+
im = IndexMetadata(self.name, self.name, self.name, kind='CUSTOM', index_options={'target': self.name, 'class_name': 'Class', 'delimiter': self.name})
548+
log.debug(im.export_as_string())
542549

543550
def test_function(self):
544551
fm = Function(self.name, self.name, (u'int', u'int'), (u'x', u'y'), u'int', u'language', self.name, False)

0 commit comments

Comments
 (0)