Skip to content

Commit 34d27f3

Browse files
committed
fix: typo in integration test
1 parent 767c64c commit 34d27f3

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

scripts/test_contributions_integration.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
BASE_URL = "https://metadata-portal.allenneuraldynamics.org"
2525
PROJECT = f"integration-test-lifecycle-{int(time.time())}"
26+
DOI = f"10.1234/integration-test-{int(time.time())}"
2627
PASSWORD = "sha256-integration-test-hash"
2728
GET_URL = f"{BASE_URL}/contributions/get"
2829
POST_URL = f"{BASE_URL}/contributions/post"
@@ -99,7 +100,7 @@ def check(response, expected_status):
99100

100101
V2 = {
101102
"project_name": PROJECT,
102-
"doi": "10.1234/integration-test",
103+
"doi": DOI,
103104
"contributors": [
104105
{
105106
"author": {
@@ -146,7 +147,7 @@ def check(response, expected_status):
146147
data = check(r, 200)
147148
names = [c["author"]["name"] for c in data["contributors"]]
148149
assert len(names) == 2, f"expected 2 contributors, got {names}"
149-
assert data.get("doi") == "10.1234/integration-test"
150+
assert data.get("doi") == DOI
150151
assert data.get("locked") is True, f"expected locked=True, got {data.get('locked')}"
151152
print(f" contributors: {names}")
152153
print(f" doi: {data.get('doi')}")
@@ -170,7 +171,7 @@ def check(response, expected_status):
170171

171172
V3 = {
172173
"project_name": PROJECT,
173-
"doi": "10.1234/integration-test",
174+
"doi": DOI,
174175
"contributors": [
175176
{
176177
"author": {
@@ -243,7 +244,7 @@ def check(response, expected_status):
243244
sep("Step 8: GET token without password on locked project (expect 401)")
244245
r = requests.get(
245246
TOKEN_URL,
246-
params={"doi": "10.1234/integration-test", "type": "add_author"},
247+
params={"doi": DOI, "type": "add_author"},
247248
)
248249
check(r, 401)
249250

@@ -255,7 +256,7 @@ def check(response, expected_status):
255256
r = requests.get(
256257
TOKEN_URL,
257258
params={
258-
"doi": "10.1234/integration-test",
259+
"doi": DOI,
259260
"type": "add_author",
260261
"password": PASSWORD,
261262
},
@@ -275,7 +276,7 @@ def check(response, expected_status):
275276

276277
V4 = {
277278
"project_name": PROJECT,
278-
"doi": "10.1234/integration-test",
279+
"doi": DOI,
279280
"contributors": [
280281
{
281282
"author": {
@@ -368,7 +369,7 @@ def check(response, expected_status):
368369
r = requests.get(
369370
TOKEN_URL,
370371
params={
371-
"doi": "10.1234/integration-test",
372+
"doi": DOI,
372373
"type": "edit_author",
373374
"password": PASSWORD,
374375
},
@@ -383,7 +384,7 @@ def check(response, expected_status):
383384
r = requests.get(
384385
TOKEN_URL,
385386
params={
386-
"doi": "10.1234/integration-test",
387+
"doi": DOI,
387388
"type": "edit_author",
388389
"author": "Carmen Silva",
389390
"days": "30",
@@ -405,7 +406,7 @@ def check(response, expected_status):
405406

406407
V5 = {
407408
"project_name": PROJECT,
408-
"doi": "10.1234/integration-test",
409+
"doi": DOI,
409410
"contributors": [
410411
{
411412
"author": {

0 commit comments

Comments
 (0)