Copy over unit test from py3 for metadata
Copy over unit test from py3 for metadata

Summary:
The test is largely copied, though the parts related to structured annotations are removed and will be re-added later when structured annotation support is done.

In addition since typedefs currently don't seem to work, those parts have been commented out for now.

Reviewed By: pyamane

Differential Revision: D34067227

fbshipit-source-id: ad76d952fab5db3db77cb606efa0ddc2df1c2536

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift