Skip to content

Commit

Permalink
Adds description to relevant tests in test_driver_alchemy_crud
Browse files Browse the repository at this point in the history
  • Loading branch information
k-burt-uch committed Apr 20, 2023
1 parent 73d0b72 commit db66756
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tests/test_driver_alchemy_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def test_driver_get_record():
baseid = str(uuid.uuid4())
created_date = datetime.now()
updated_date = datetime.now()
description = ""
description = "a description"
content_created_date = datetime.now()
content_updated_date = datetime.now()

Expand Down Expand Up @@ -520,9 +520,10 @@ def test_driver_nonstrict_get_without_prefix():
updated_date = datetime.now()
content_created_date = datetime.now()
content_updated_date = datetime.now()
description = "a description"
conn.execute(
"""
INSERT INTO index_record(did, baseid, rev, form, size, created_date, updated_date, content_created_date, content_updated_date) VALUES (?,?,?,?,?,?,?,?,?)
INSERT INTO index_record(did, baseid, rev, form, size, created_date, updated_date, content_created_date, content_updated_date, description) VALUES (?,?,?,?,?,?,?,?,?,?)
""",
(
"testprefix/" + did,
Expand All @@ -534,6 +535,7 @@ def test_driver_nonstrict_get_without_prefix():
updated_date,
content_created_date,
content_updated_date,
description,
),
)

Expand Down Expand Up @@ -578,7 +580,7 @@ def test_driver_nonstrict_get_with_prefix():
baseid = str(uuid.uuid4())
created_date = datetime.now()
updated_date = datetime.now()
description = ""
description = "a description"
content_created_date = datetime.now()
content_updated_date = datetime.now()
conn.execute(
Expand Down Expand Up @@ -688,7 +690,7 @@ def test_driver_get_latest_version():
baseid = str(uuid.uuid4())
created_date = datetime.now()
updated_date = datetime.now()
description = ""
description = "a description"
content_created_date = datetime.now()
content_updated_date = datetime.now()
conn.execute(
Expand Down Expand Up @@ -771,6 +773,7 @@ def test_driver_get_all_versions():
updated_dates = []
content_created_dates = []
content_updated_dates = []
descriptions = []
for _ in range(NUMBER_OF_RECORD):
did = str(uuid.uuid4())
rev = str(uuid.uuid4())[:8]
Expand All @@ -780,16 +783,17 @@ def test_driver_get_all_versions():
updated_date = created_date
content_created_date = datetime.now()
content_updated_date = created_date
description = f"description for {did}"
dids.append(did)
revs.append(rev)
created_dates.append(created_date)
updated_dates.append(updated_date)
content_created_dates.append(content_created_date)
content_updated_dates.append(content_updated_date)
descriptions.append(description)
conn.execute(
"""
INSERT INTO index_record(did, baseid, rev, form, size, created_date, updated_date, content_created_date, content_updated_date) \
VALUES (?,?,?,?,?,?,?,?,?)
INSERT INTO index_record(did, baseid, rev, form, size, created_date, updated_date, content_created_date, content_updated_date, description) \
VALUES (?,?,?,?,?,?,?,?,?,?)
""",
(
did,
Expand All @@ -801,6 +805,7 @@ def test_driver_get_all_versions():
updated_date,
content_created_date,
content_updated_date,
description,
),
)

Expand Down

0 comments on commit db66756

Please sign in to comment.