wordnik/wordnik-python — pull request #20 by hugovk (2014-02-06 11:41:42+00:00)
Title: Test word lists with Unicode

For testing issue 19. Right now these tests fail on Windows with Python 2.7:
```
E.E...
======================================================================
ERROR: testAddUnicodeWordsToWordList (__main__.WordListApiTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests\WordListApiTest.py", line 117, in testAddUnicodeWordsToWordLi
self.authToken, body=wordsToAdd)
File "./wordnik\WordListApi.py", line 191, in addWordsToWordList
postData, headerParams)
File "./wordnik\swagger.py", line 61, in callAPI
data = self.sanitizeForSerialization(postData)
File "./wordnik\swagger.py", line 103, in sanitizeForSerialization
return [self.sanitizeForSerialization(subObj) for subObj in obj]
File "./wordnik\swagger.py", line 112, in sanitizeForSerialization
for (key, val) in objDict.iteritems()
File "./wordnik\swagger.py", line 113, in
if key != 'swaggerTypes'}
File "./wordnik\swagger.py", line 110, in sanitizeForSerialization
objDict = obj.__dict__
AttributeError: 'unicode' object has no attribute '__dict__'

======================================================================
ERROR: testDeleteUnicodeWordsFromList (__main__.WordListApiTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests\WordListApiTest.py", line 139, in testDeleteUnicodeWordsFromL
body=wordsToRemove)
File "./wordnik\WordListApi.py", line 287, in deleteWordsFromWordList
postData, headerParams)
File "./wordnik\swagger.py", line 61, in callAPI
data = self.sanitizeForSerialization(postData)
File "./wordnik\swagger.py", line 103, in sanitizeForSerialization
return [self.sanitizeForSerialization(subObj) for subObj in obj]
File "./wordnik\swagger.py", line 112, in sanitizeForSerialization
for (key, val) in objDict.iteritems()
File "./wordnik\swagger.py", line 113, in
if key != 'swaggerTypes'}
File "./wordnik\swagger.py", line 110, in sanitizeForSerialization
objDict = obj.__dict__
AttributeError: 'unicode' object has no attribute '__dict__'

----------------------------------------------------------------------
Ran 6 tests in 7.516s

FAILED (errors=2)
```