def test_get_documents_simple(client): unique_name = "".join( random.choices(string.ascii_uppercase + string.digits, k=8)) doc = OnshapeElement.create(unique_name) time.sleep(5) documents = client.documents_api.get_documents(q=unique_name) doc.delete() assert len(documents["items"]) == 1
def new_document(request, client, name_factory): """Returns a blank new document.""" doc = OnshapeElement.create(name_factory()) yield doc doc.delete()