def METHOD_NAME(self, tmpdir, remote, format):
    if format == 'json':
        content = self.getTestJson()
    else:
        content = self.getTestYaml()
    if remote:
        fa = self.make_file_annotation(
            name='test.%s' % format, binary=content, mimetype=format)
        fid = unwrap(fa.file.id)
        fileobj = 'OriginalFile:%d' % fid
    else:
        f = tmpdir.join('test.%s' % format)
        f.write(content)
        fileobj = str(f)
    data = pydict_text_io.load(
        fileobj, session=self.client.getSession())
    assert data == {'a': 2}