Skip to content

Commit

Permalink
Added more test methods and update test deps
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgross committed Dec 22, 2023
1 parent ceb9ff5 commit 0c9f4e3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[run]
relative_files = True

[report]
include =
src/*
omit =
*/tests/*
src/pcloud/tests/*
20 changes: 20 additions & 0 deletions src/pcloud/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={})
Expand Down
9 changes: 5 additions & 4 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0c9f4e3

Please sign in to comment.