Skip to content

Commit

Permalink
test: Update DB fixture with new release_date column
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 7, 2024
1 parent c52dd6b commit a0f108c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 10 additions & 5 deletions tests/dataset/test_metadata_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,20 @@ def create_compiled_release(cursor, collection_id, collection_file_item_id, data
ocid,
collection_id,
collection_file_item_id,
data_id
data_id,
release_date
) VALUES (
'ocds-lcuori-1',
%(collection_id)s,
%(collection_file_item_id)s,
%(max_data_id)s
%(max_data_id)s,
'2038'
), (
'ocds-lcuori-1',
%(collection_id)s,
%(collection_file_item_id)s,
%(min_data_id)s
%(min_data_id)s,
'1970'
)
""",
{
Expand Down Expand Up @@ -163,14 +166,16 @@ def test_get_kingfisher_metadata_release(
collection_id,
collection_file_item_id,
data_id,
package_data_id
package_data_id,
release_date
) VALUES (
'1',
'ocds-lcuori-1',
%(collection_id)s,
%(collection_file_item_id)s,
%(data_id)s,
%(package_data_id)s
%(package_data_id)s,
''
)
""",
{
Expand Down
6 changes: 4 additions & 2 deletions tests/fixtures/kingfisher_process.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ CREATE TABLE IF NOT EXISTS compiled_release (
ocid text NOT NULL,
collection_id bigint NOT NULL,
collection_file_item_id bigint NOT NULL,
data_id bigint NOT NULL
data_id bigint NOT NULL,
release_date text NOT NULL
);

CREATE TABLE IF NOT EXISTS data (
Expand Down Expand Up @@ -69,5 +70,6 @@ CREATE TABLE IF NOT EXISTS release (
collection_id bigint NOT NULL,
collection_file_item_id bigint NOT NULL,
data_id bigint NOT NULL,
package_data_id bigint NOT NULL
package_data_id bigint NOT NULL,
release_date text NOT NULL
);

0 comments on commit a0f108c

Please sign in to comment.