Skip to content

Commit

Permalink
fix: wrong test case!
Browse files Browse the repository at this point in the history
it was using channel_id instead of category_id for discourse data.
  • Loading branch information
amindadgar committed Aug 8, 2024
1 parent 4f30968 commit 790f1ad
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def test_extract_all_resources(self):
},
]
self.client[self.platform_id]["rawmemberactivities"].insert_many(sample_data)
extract_data = ExtractPlatformRawData(self.platform_id, "channel_id")
extract_data = ExtractPlatformRawData(self.platform_id, "category_id")

cursor, override_recompute = extract_data.extract(
from_date=datetime(2020, 1, 1),
to_date=None,
resources=["8888", "8880"],
resources=["34567", "34569"],
recompute=False,
)
results = list(cursor)
Expand Down Expand Up @@ -104,12 +104,12 @@ def test_extract_some_resources(self):
},
]
self.client[self.platform_id]["rawmemberactivities"].insert_many(sample_data)
extract_data = ExtractPlatformRawData(self.platform_id, "channel_id")
extract_data = ExtractPlatformRawData(self.platform_id, "category_id")

cursor, override_recompute = extract_data.extract(
from_date=datetime(2020, 1, 1),
to_date=None,
resources=["8888"],
resources=["34567"],
recompute=False,
)
results = list(cursor)
Expand Down Expand Up @@ -155,12 +155,12 @@ def test_extract_no_data_date_filtered(self):
},
]
self.client[self.platform_id]["rawmemberactivities"].insert_many(sample_data)
extract_data = ExtractPlatformRawData(self.platform_id, "channel_id")
extract_data = ExtractPlatformRawData(self.platform_id, "category_id")

cursor, override_recompute = extract_data.extract(
from_date=datetime(2023, 1, 1),
to_date=None,
resources=["8888"],
resources=["34567"],
recompute=False,
)
results = list(cursor)
Expand Down Expand Up @@ -205,12 +205,12 @@ def test_extract_some_with_to_date(self):
},
]
self.client[self.platform_id]["rawmemberactivities"].insert_many(sample_data)
extract_data = ExtractPlatformRawData(self.platform_id, "channel_id")
extract_data = ExtractPlatformRawData(self.platform_id, "category_id")

cursor, override_recompute = extract_data.extract(
from_date=datetime(2022, 1, 1),
to_date=datetime(2023, 2, 1),
resources=["8888"],
resources=["34567"],
recompute=False,
)
results = list(cursor)
Expand Down Expand Up @@ -264,12 +264,12 @@ def test_extract_no_override(self):
},
]
self.client[self.platform_id]["rawmemberactivities"].insert_many(sample_data)
extract_data = ExtractPlatformRawData(self.platform_id, "channel_id")
extract_data = ExtractPlatformRawData(self.platform_id, "category_id")

cursor, override_recompute = extract_data.extract(
from_date=datetime(2020, 1, 1),
to_date=None,
resources=["8888", "8880"],
resources=["34567", "34569"],
recompute=False,
)
results = list(cursor)
Expand Down

0 comments on commit 790f1ad

Please sign in to comment.