Skip to content

Commit af93bba

Browse files
Add tests
1 parent 5123f78 commit af93bba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_tiscale.py

+12
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ class TestTitaniumScale:
3939
def setup_class(cls):
4040
cls.tiscale = TitaniumScale(cls.host, token=cls.token)
4141

42+
def test_sample_from_path(self):
43+
with pytest.raises(WrongInputError, match=r"file_path must be a string."):
44+
self.tiscale.upload_sample_from_path(file_path=123)
45+
46+
def test_sample_from_file(self):
47+
with pytest.raises(WrongInputError, match=r"file_source parameter must be a file open in 'rb' mode."):
48+
self.tiscale.upload_sample_from_file(file_source="/path/to/file")
49+
50+
def test_get_results(self):
51+
with pytest.raises(WrongInputError, match=r"full_report parameter must be boolean."):
52+
self.tiscale.get_results(task_url="/task/url", full_report=3)
53+
4254
def test_list_tasks(self, requests_mock):
4355
self.tiscale.list_processing_tasks(age=10, custom_token="custom")
4456

0 commit comments

Comments
 (0)