Cleanup: Replace getType witha getter
Use a file-like instance (StringIO) in test_resource_upload