Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import arvados
- def simple_add_update():
- """Test adding and updating a collection to reproduce certificate error.
- """
- project_uuid = "pirca-j7d0g-5r1871r5x70shay" # You should use your own project uuid.
- name = "save_new_test"
- fname = "seqs.fa"
- avoid_an_error = False
- #arvados_conn = get_connection_config()
- c = arvados.collection.Collection()
- with c.open(fname, "wb") as writer:
- writer.write(">aseq\nGATC\n")
- c.save_new(name=name, owner_uuid=project_uuid)
- c2 = arvados.collection.Collection(c.manifest_locator())
- c2.remove(fname)
- if avoid_an_error:
- c2.save()
- with c2.open(fname, "wb") as writer:
- writer.write(">aseq\nGATTACA\n")
- c2.save()
- if __name__ == "__main__":
- simple_add_update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement