Skip to content

Commit

Permalink
Rearrange project structure, add tests for upload_image
Browse files Browse the repository at this point in the history
  • Loading branch information
wwakabobik committed Aug 19, 2024
1 parent a223c00 commit e4b2809
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion tests/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion tests/utils/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/utils/test_reporter_utils_format_error.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests for the reporter_utils module, function 'format_error'"""

from testrail_api_reporter.utils.reporter_utils import format_error
from ...testrail_api_reporter.utils.reporter_utils import format_error


def test_format_error_single_string():
Expand Down
3 changes: 2 additions & 1 deletion tests/utils/test_reporter_utils_upload_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
from faker import Faker
from pytest import raises as pytest_raises

from testrail_api_reporter.utils.reporter_utils import upload_image
from ...testrail_api_reporter.utils.reporter_utils import upload_image


test_filename = choice((f"{getcwd()}/tests/assets/test_image.png", f"{getcwd()}/tests/assets/test_image.jpeg"))


def test_upload_image_mock_success():
"""Test success image upload (mock)"""
with patch("requests.post") as mock_post:
Expand Down

0 comments on commit e4b2809

Please sign in to comment.