Skip to content

Commit 3466a2c

Browse files
authored
SFR-2181: get edition id (#384)
* SFR-2181: get edition id * file name update
1 parent 1192f48 commit 3466a2c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/rest_api/test_get_edition.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 + "/edition/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)