THRIFT-4206: Fix decoding of strings in containers with py:dynamic and py:utf8strings
Client: py

_read_by_ttype and _write_by_ttype must be using the *element* spec
and not the container spec when determining the correct read/write
handler.

This closes #1273
diff --git a/test/py/FastbinaryTest.py b/test/py/FastbinaryTest.py
index db3ef8b..d231abf 100755
--- a/test/py/FastbinaryTest.py
+++ b/test/py/FastbinaryTest.py
@@ -85,6 +85,10 @@
 
 hm.contain.add(("and a one", "and a two"))
 hm.contain.add(("then a one, two", "three!", "FOUR!"))
+if sys.version_info[0] == 2 and os.environ.get('THRIFT_TEST_PY_NO_UTF8STRINGS'):
+    hm.contain.add((u"\xd7\n\a\t".encode('utf8'),))
+else:
+    hm.contain.add((u"\xd7\n\a\t",))
 hm.contain.add(())
 
 hm.bonks["nothing"] = []