From 9e1884b71314207388b7eaabe520d91ae7a41ce9 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Wed, 13 Mar 2024 16:50:03 +0330 Subject: [PATCH] fix: test cases based on previous updates! - The summary type was added in other commits. - The COMMITED relationships typo was fixed on staging database. --- .../test_discord_summary_transform_daily_summaries.py | 6 +++--- .../tests/integration/test_github_etl_fetch_commits.py | 10 +++++----- .../integration/test_github_etl_fetch_raw_commits.py | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dags/hivemind_etl_helpers/tests/integration/test_discord_summary_transform_daily_summaries.py b/dags/hivemind_etl_helpers/tests/integration/test_discord_summary_transform_daily_summaries.py index 56f1fab1..3ea81ace 100644 --- a/dags/hivemind_etl_helpers/tests/integration/test_discord_summary_transform_daily_summaries.py +++ b/dags/hivemind_etl_helpers/tests/integration/test_discord_summary_transform_daily_summaries.py @@ -25,15 +25,15 @@ def test_transform_daily_summary_to_document(self): expected_documents = [ Document( text="Summary 1", - metadata={"date": "2023-01-01", "channel": None, "thread": None}, + metadata={"date": "2023-01-01", "type": "day"}, ), Document( text="Summary 2", - metadata={"date": "2023-01-02", "channel": None, "thread": None}, + metadata={"date": "2023-01-02", "type": "day"}, ), Document( text="Summary 3", - metadata={"date": "2023-01-03", "channel": None, "thread": None}, + metadata={"date": "2023-01-03", "type": "day"}, ), ] diff --git a/dags/hivemind_etl_helpers/tests/integration/test_github_etl_fetch_commits.py b/dags/hivemind_etl_helpers/tests/integration/test_github_etl_fetch_commits.py index 0a589638..7656279b 100644 --- a/dags/hivemind_etl_helpers/tests/integration/test_github_etl_fetch_commits.py +++ b/dags/hivemind_etl_helpers/tests/integration/test_github_etl_fetch_commits.py @@ -29,7 +29,7 @@ def test_get_single_commit_single_repo_no_from_date(self): session.execute_write( lambda tx: tx.run( """ - CREATE (co:Commit)<-[:COMMITED]-(user:GitHubUser {login: "author #1"}) + CREATE (co:Commit)<-[:COMMITTED]-(user:GitHubUser {login: "author #1"}) SET co.`commit.author.name` = "Author#1", co.`commit.message` = "Issue #1 is resolved!", @@ -68,7 +68,7 @@ def test_get_single_commit_single_repo_with_from_date(self): session.execute_write( lambda tx: tx.run( """ - CREATE (co:Commit)<-[:COMMITED]-(user:GitHubUser {login: "author #1"}) + CREATE (co:Commit)<-[:COMMITTED]-(user:GitHubUser {login: "author #1"}) SET co.`commit.author.name` = "Author#1", co.`commit.message` = "Issue #1 is resolved!", @@ -108,7 +108,7 @@ def test_get_multiple_commit_multi_repo_with_from_date_filter(self): session.execute_write( lambda tx: tx.run( """ - CREATE (co:Commit)<-[:COMMITED]-(:GitHubUser {login: "author #1"}) + CREATE (co:Commit)<-[:COMMITTED]-(:GitHubUser {login: "author #1"}) SET co.`commit.author.name` = "Author#1", co.`commit.message` = "Issue #1 is resolved!", @@ -120,7 +120,7 @@ def test_get_multiple_commit_multi_repo_with_from_date_filter(self): co.`commit.author.date` = "2024-01-01T10:23:50Z", co.`commit.verification.reason` = "invalid" - CREATE (co2:Commit)<-[:COMMITED]-(:GitHubUser {login: "author #2"}) + CREATE (co2:Commit)<-[:COMMITTED]-(:GitHubUser {login: "author #2"}) SET co2.`commit.author.name` = "Author#2", co2.`commit.message` = "Issue #2 is resolved!", @@ -132,7 +132,7 @@ def test_get_multiple_commit_multi_repo_with_from_date_filter(self): co2.`commit.author.date` = "2023-01-01T10:23:50Z", co2.`commit.verification.reason` = "invalid" - CREATE (co3:Commit)<-[:COMMITED]-(:GitHubUser {login: "author #3"}) + CREATE (co3:Commit)<-[:COMMITTED]-(:GitHubUser {login: "author #3"}) SET co3.`commit.author.name` = "Author#3", co3.`commit.message` = "Issue #3 is resolved!", diff --git a/dags/hivemind_etl_helpers/tests/integration/test_github_etl_fetch_raw_commits.py b/dags/hivemind_etl_helpers/tests/integration/test_github_etl_fetch_raw_commits.py index c6bb05cd..62edd6d1 100644 --- a/dags/hivemind_etl_helpers/tests/integration/test_github_etl_fetch_raw_commits.py +++ b/dags/hivemind_etl_helpers/tests/integration/test_github_etl_fetch_raw_commits.py @@ -29,7 +29,7 @@ def test_get_single_commit_single_repo_no_from_date(self): session.execute_write( lambda tx: tx.run( """ - CREATE (co:Commit)<-[:COMMITED]-(user:GitHubUser {login: "author #1"}) + CREATE (co:Commit)<-[:COMMITTED]-(user:GitHubUser {login: "author #1"}) SET co.`commit.author.name` = "Author#1", co.`commit.message` = "Issue #1 is resolved!", @@ -70,7 +70,7 @@ def test_get_single_commit_single_repo_with_from_date(self): session.execute_write( lambda tx: tx.run( """ - CREATE (co:Commit)<-[:COMMITED]-(user:GitHubUser {login: "author #1"}) + CREATE (co:Commit)<-[:COMMITTED]-(user:GitHubUser {login: "author #1"}) SET co.`commit.author.name` = "Author#1", co.`commit.message` = "Issue #1 is resolved!",