def test_build_as_dict(collection, valid_data):
    """Test that build() works the same whether called from FileLink or FileCollection."""
    assert collection.build(valid_data).dump() == FileLink.build(
        valid_data).as_dict()
 def upload(self, file_path: str, dest_name: str = None) -> FileLink:
     self.files.append(file_path)
     return FileLink(url=file_path, filename=file_path)