From 0c9f4e37f8b23e234b804d6dabcb8c9f2a54ae30 Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Fri, 22 Dec 2023 09:21:56 +0100 Subject: [PATCH] Added more test methods and update test deps --- .coveragerc | 4 +--- src/pcloud/tests/test_api.py | 20 ++++++++++++++++++++ test_requirements.txt | 9 +++++---- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.coveragerc b/.coveragerc index 63f46cb..d6d9e85 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,8 +1,6 @@ [run] relative_files = True - -[report] include = src/* omit = - */tests/* + src/pcloud/tests/* \ No newline at end of file diff --git a/src/pcloud/tests/test_api.py b/src/pcloud/tests/test_api.py index 83e2915..54053e8 100644 --- a/src/pcloud/tests/test_api.py +++ b/src/pcloud/tests/test_api.py @@ -91,6 +91,26 @@ def test_getfilelink(self): with pytest.raises(api.OnlyPcloudError): papi.getfilelink(file="/test.txt") + def test_getvideolink(self): + papi = DummyPyCloud("foo", "bar") + with pytest.raises(api.OnlyPcloudError): + papi.getvideolink(file="/test.txt") + + def test_getvideolinks(self): + papi = DummyPyCloud("foo", "bar") + with pytest.raises(api.OnlyPcloudError): + papi.getvideolinks(file="/test.txt") + + def test_getfilepublink(self): + papi = DummyPyCloud("foo", "bar") + with pytest.raises(api.OnlyPcloudError): + papi.getfilepublink(file="/test.txt") + + def test_getpublinkdownload(self): + papi = DummyPyCloud("foo", "bar") + with pytest.raises(api.OnlyPcloudError): + papi.getpublinkdownload(file="/test.txt") + def test_server_security(self): api = DummyPyCloud("", "") resp = api.session.get(api.endpoint + "../../bogus.sh", params={}) diff --git a/test_requirements.txt b/test_requirements.txt index 418707b..449b929 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,9 +1,10 @@ -pytest==7.4.0 +pytest==7.4.3 pytest-sugar==0.9.7 -pytest-timeout==2.1.0 +pytest-timeout==2.2.0 pytest-cov==4.1.0 -wheel==0.40.0 +wheel==0.42.0 +# flake8 version 6 requires Python 3.8+ flake8==5.0.4 fs==2.4.16 -playwright==1.35.0 +playwright==1.40.0 multipart==0.2.4