Skip to content

Commit

Permalink
Added path to src/ so that tests can run in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasmus Oscar Welander committed Aug 27, 2024
1 parent 4a416da commit 4a8ec83
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

import sys
import pytest
from unittest.mock import Mock, patch
from configparser import ConfigParser
Expand All @@ -25,6 +26,8 @@
import base64
import json

sys.path.append("../src/")


@pytest.fixture
def mock_config():
Expand Down
7 changes: 7 additions & 0 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Last updated: 19/08/2024
"""

import sys

sys.path.append("src/")

from exceptions.exceptions import (
AuthenticationException,
NotFoundException,
Expand All @@ -30,6 +34,9 @@

import pytest

sys.path.append("src/")


# Test cases for the App class
# Test cases for the App class `list_app_providers` method using parameterized tests

Expand Down
5 changes: 5 additions & 0 deletions tests/test_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Last updated: 19/08/2024
"""

import sys

sys.path.append("src/")

from exceptions.exceptions import (
AuthenticationException,
NotFoundException,
Expand All @@ -30,6 +34,7 @@

import pytest

sys.path.append("src/")
# Test cases for the Checkpoint class


Expand Down
6 changes: 6 additions & 0 deletions tests/test_cs3client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Last updated: 26/07/2024
"""

import sys

sys.path.append("src/")

from fixtures import ( # noqa: F401 (they are used, the framework is not detecting it)
cs3_client_insecure,
cs3_client_secure,
Expand All @@ -17,6 +21,8 @@
create_mock_jwt,
)

sys.path.append("src/")


def test_cs3client_initialization_secure(cs3_client_secure): # noqa: F811 (not a redefinition)
client = cs3_client_secure
Expand Down
6 changes: 6 additions & 0 deletions tests/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Last updated: 19/08/2024
"""

import sys

sys.path.append("src/")

from cs3resource import Resource
from exceptions.exceptions import (
AuthenticationException,
Expand All @@ -27,6 +31,8 @@
from unittest.mock import Mock, patch
import pytest

sys.path.append("src/")


@pytest.mark.parametrize(
"status_code, status_message, expected_exception, expected_result",
Expand Down
6 changes: 6 additions & 0 deletions tests/test_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
Last updated: 26/07/2024
"""

import sys

sys.path.append("src/")

import unittest
import cs3.storage.provider.v1beta1.resources_pb2 as cs3spr
from cs3resource import Resource

sys.path.append("src/")


class TestResource(unittest.TestCase):

Expand Down
6 changes: 6 additions & 0 deletions tests/test_share.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Last updated: 19/08/2024
"""

import sys

sys.path.append("src/")

from exceptions.exceptions import (
AuthenticationException,
NotFoundException,
Expand Down Expand Up @@ -35,6 +39,8 @@

import pytest

sys.path.append("src/")

# Test cases for the Share class `get_share` method using parameterized tests


Expand Down
4 changes: 4 additions & 0 deletions tests/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Last updated: 19/08/2024
"""

import sys

sys.path.append("src/")

from exceptions.exceptions import (
AuthenticationException,
NotFoundException,
Expand Down

0 comments on commit 4a8ec83

Please sign in to comment.