Skip to content

Commit

Permalink
fix: missng test cases to update!
Browse files Browse the repository at this point in the history
+ fixed black linter isssues too.
  • Loading branch information
amindadgar committed Aug 6, 2024
1 parent ee9897e commit 7b87f2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dags/analyzer_helper/discourse/transform_raw_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def create_data_entry(
metadata = {
**metadata, # previous ones
"link": (
f"https://{self.forum_endpoint}/t/" +
f"{int(topic_id)}/{int(post_number)}"
)
f"https://{self.forum_endpoint}/t/"
+ f"{int(topic_id)}/{int(post_number)}"
),
}

result = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def test_transform_data_with_replied_user(self):
},
{
"author_id": "4444",
"text": "some content #2",
"date": datetime.datetime(
2023, 9, 11, 21, 41, 43, 553000, tzinfo=datetime.timezone.utc
),
Expand All @@ -135,6 +136,7 @@ def test_transform_data_with_replied_user(self):
"category_id": None,
"topic_id": 6134,
"bot_activity": False,
"link": f"https://{self.forum_endpoint}/t/6134/1",
},
"actions": [],
"interactions": [
Expand Down Expand Up @@ -207,19 +209,20 @@ def test_transform_data_with_reactions(self):
"name": "reaction",
"type": "emitter",
"users_engaged_id": ["6168"],
"link": f"https://{self.forum_endpoint}/t/6134/1",
}
],
"metadata": {
"category_id": None,
"topic_id": 6134,
"bot_activity": False,
"link": f"https://{self.forum_endpoint}/t/6134/1",
},
"source_id": "6261",
},
{
"actions": [],
"author_id": "2",
"text": "some content #2",
"date": datetime.datetime(
2023, 9, 11, 21, 42, 43, 553000, tzinfo=datetime.timezone.utc
),
Expand All @@ -234,6 +237,7 @@ def test_transform_data_with_reactions(self):
"category_id": None,
"topic_id": 6134,
"bot_activity": False,
"link": f"https://{self.forum_endpoint}/t/6134/1",
},
"source_id": "6261",
},
Expand Down

0 comments on commit 7b87f2a

Please sign in to comment.