Skip to content

Commit 80b8b29

Browse files
authored
SFR-2180: Get link for a single id (#383)
* SFR-2180:get-single-id * add an extra line * update test file name
1 parent 3466a2c commit 80b8b29

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/rest_api/test_get_link.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import requests
2+
import pytest
3+
4+
BASE_URL = "https://drb-api-qa.nypl.org"
5+
6+
def test_get_collection():
7+
8+
url = BASE_URL + "/link/1982731"
9+
response = requests.get(url)
10+
11+
assert response.status_code is not None
12+
assert response.status_code == 200, (
13+
f"API call failed.\n"
14+
f"Expected status code: {200}\n"
15+
f"Actual status code: {response.status_code}\n"
16+
f"URL: {url}\n"
17+
f"Response text: {response.text[:100]}..."
18+
)
19+
20+
response_json = response.json()
21+
22+
assert response_json is not None
23+

0 commit comments

Comments
 (0)