@@ -16,6 +16,7 @@ def pycloud():
1616 return PyCloud (username , password , endpoint = "eapi" )
1717
1818
19+ testfilename = "Getting started with pCloud.pdf"
1920folder_for_tests = "integration-test"
2021# upload `data/upload.txt` to integration test instance,
2122# generate a public link (code) and insert the code below.
@@ -65,7 +66,6 @@ def test_publink_zip(pycloud):
6566
6667
6768def test_copyfile (pycloud , testfolder ):
68- testfilename = "Getting started with pCloud.pdf"
6969 tofilename = f"/{ folder_for_tests } /{ testfilename } "
7070 resp = pycloud .copyfile (path = f"/{ testfilename } " , topath = tofilename )
7171 assert resp ["result" ] == 0
@@ -76,6 +76,10 @@ def test_copyfile(pycloud, testfolder):
7676 == "df745d42f69266c49141ea7270c45240cf883b9cdb6a14fffcdff33c04c5304c"
7777 ), f"Failure with checksum in { resp } "
7878
79+ def test_search (pycloud ):
80+ resp = pycloud .search (query = testfilename , limit = 1 )
81+ assert len (resp ['items' ]) == 1
82+ assert resp ['items' ][0 ]['name' ] == testfilename
7983
8084def test_listtokens (pycloud ):
8185 result = pycloud .listtokens ()
0 commit comments