Skip to content

Commit cf2119b

Browse files
committed
Fix integration tests
1 parent 7eb3f14 commit cf2119b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,7 @@ jobs:
196196
- name: Test with pytest
197197
run: |
198198
make test-integration
199+
env:
200+
UPLOADCARE_PUBLIC_KEY: ${{ secrets.UPLOADCARE_PUBLIC_KEY }}
201+
UPLOADCARE_SECRET_KEY: ${{ secrets.UPLOADCARE_SECRET_KEY }}
202+

tests/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def big_file(temp_directory):
5858

5959
@pytest.fixture(scope="session")
6060
def setup_settings():
61-
conf.pub_key = "demopublickey"
62-
conf.secret = "demosecretkey"
61+
conf.pub_key = os.environ.get("UPLOADCARE_PUBLIC_KEY", "demopublickey")
62+
conf.secret = os.environ.get("UPLOADCARE_SECRET_KEY", "demosecretkey")
6363
conf.api_version = "0.7"
6464
conf.api_base = "https://api.uploadcare.com/"
6565
conf.upload_base = "https://upload.uploadcare.com/"
@@ -88,9 +88,9 @@ def vcr_config():
8888
@pytest.fixture(scope="module")
8989
def uploadcare(setup_settings):
9090
uc = Uploadcare(
91-
public_key="demopublickey",
92-
secret_key="demosecretkey",
93-
api_version=conf.api_version,
91+
public_key=setup_settings.pub_key,
92+
secret_key=setup_settings.secret,
93+
api_version=setup_settings.api_version,
9494
multipart_min_file_size=setup_settings.multipart_min_file_size,
9595
multipart_chunk_size=setup_settings.multipart_chunk_size,
9696
)

0 commit comments

Comments
 (0)