Skip to content

Commit 4a8ec83

Browse files
author
Rasmus Oscar Welander
committed
Added path to src/ so that tests can run in CI
1 parent 4a416da commit 4a8ec83

8 files changed

+43
-0
lines changed

tests/fixtures.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
1010
"""
1111

12+
import sys
1213
import pytest
1314
from unittest.mock import Mock, patch
1415
from configparser import ConfigParser
@@ -25,6 +26,8 @@
2526
import base64
2627
import json
2728

29+
sys.path.append("../src/")
30+
2831

2932
@pytest.fixture
3033
def mock_config():

tests/test_app.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
Last updated: 19/08/2024
99
"""
1010

11+
import sys
12+
13+
sys.path.append("src/")
14+
1115
from exceptions.exceptions import (
1216
AuthenticationException,
1317
NotFoundException,
@@ -30,6 +34,9 @@
3034

3135
import pytest
3236

37+
sys.path.append("src/")
38+
39+
3340
# Test cases for the App class
3441
# Test cases for the App class `list_app_providers` method using parameterized tests
3542

tests/test_checkpoint.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
Last updated: 19/08/2024
99
"""
1010

11+
import sys
12+
13+
sys.path.append("src/")
14+
1115
from exceptions.exceptions import (
1216
AuthenticationException,
1317
NotFoundException,
@@ -30,6 +34,7 @@
3034

3135
import pytest
3236

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

3540

tests/test_cs3client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
Last updated: 26/07/2024
99
"""
1010

11+
import sys
12+
13+
sys.path.append("src/")
14+
1115
from fixtures import ( # noqa: F401 (they are used, the framework is not detecting it)
1216
cs3_client_insecure,
1317
cs3_client_secure,
@@ -17,6 +21,8 @@
1721
create_mock_jwt,
1822
)
1923

24+
sys.path.append("src/")
25+
2026

2127
def test_cs3client_initialization_secure(cs3_client_secure): # noqa: F811 (not a redefinition)
2228
client = cs3_client_secure

tests/test_file.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
Last updated: 19/08/2024
99
"""
1010

11+
import sys
12+
13+
sys.path.append("src/")
14+
1115
from cs3resource import Resource
1216
from exceptions.exceptions import (
1317
AuthenticationException,
@@ -27,6 +31,8 @@
2731
from unittest.mock import Mock, patch
2832
import pytest
2933

34+
sys.path.append("src/")
35+
3036

3137
@pytest.mark.parametrize(
3238
"status_code, status_message, expected_exception, expected_result",

tests/test_resource.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88
Last updated: 26/07/2024
99
"""
1010

11+
import sys
12+
13+
sys.path.append("src/")
14+
1115
import unittest
1216
import cs3.storage.provider.v1beta1.resources_pb2 as cs3spr
1317
from cs3resource import Resource
1418

19+
sys.path.append("src/")
20+
1521

1622
class TestResource(unittest.TestCase):
1723

tests/test_share.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
Last updated: 19/08/2024
99
"""
1010

11+
import sys
12+
13+
sys.path.append("src/")
14+
1115
from exceptions.exceptions import (
1216
AuthenticationException,
1317
NotFoundException,
@@ -35,6 +39,8 @@
3539

3640
import pytest
3741

42+
sys.path.append("src/")
43+
3844
# Test cases for the Share class `get_share` method using parameterized tests
3945

4046

tests/test_user.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
Last updated: 19/08/2024
99
"""
1010

11+
import sys
12+
13+
sys.path.append("src/")
14+
1115
from exceptions.exceptions import (
1216
AuthenticationException,
1317
NotFoundException,

0 commit comments

Comments
 (0)