Skip to content

Commit 7be56c2

Browse files
committed
testing skeleton
1 parent 2288c02 commit 7be56c2

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

tests/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import os
2+
3+
import pytest
4+
from elinkapi import Elink
5+
6+
7+
@pytest.fixture
8+
def elink_review_client():
9+
review_endpoint = os.getenv("ELINK_REVIEW_ENDPOINT")
10+
elink_review_api_key = os.getenv("ELINK_REVIEW_API_TOKEN")
11+
return Elink(token=elink_review_api_key, target=review_endpoint)

tests/elink_service_test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from elinkapi.record import RecordResponse
2+
3+
# TODO: Write tests that verify our usage of Elink is correct,
4+
# and make sure any upstream breaking changes get caught
5+
# here when version upgrades happen
6+
7+
# 1. general query logic + params that we use regularly?
8+
# 2. make sure we can submit a correctly templated dataset submission
9+
# 3. make sure record updates work
10+
# 4. deleting records?
11+
# 5+. test any other surfaces of the Elink api that we interact with
12+
13+
14+
def test_elink_query(elink_review_client):
15+
# placeholder, just to verify gh actions until full test suite is done
16+
assert isinstance(next(elink_review_client.query_records()), RecordResponse)

0 commit comments

Comments
 (0)