Format according to the black standard
This commit is contained in:
@@ -9,15 +9,21 @@ from bdfr.archive_entry.comment_archive_entry import CommentArchiveEntry
|
||||
|
||||
@pytest.mark.online
|
||||
@pytest.mark.reddit
|
||||
@pytest.mark.parametrize(('test_comment_id', 'expected_dict'), (
|
||||
('gstd4hk', {
|
||||
'author': 'james_pic',
|
||||
'subreddit': 'Python',
|
||||
'submission': 'mgi4op',
|
||||
'submission_title': '76% Faster CPython',
|
||||
'distinguished': None,
|
||||
}),
|
||||
))
|
||||
@pytest.mark.parametrize(
|
||||
("test_comment_id", "expected_dict"),
|
||||
(
|
||||
(
|
||||
"gstd4hk",
|
||||
{
|
||||
"author": "james_pic",
|
||||
"subreddit": "Python",
|
||||
"submission": "mgi4op",
|
||||
"submission_title": "76% Faster CPython",
|
||||
"distinguished": None,
|
||||
},
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_get_comment_details(test_comment_id: str, expected_dict: dict, reddit_instance: praw.Reddit):
|
||||
comment = reddit_instance.comment(id=test_comment_id)
|
||||
test_entry = CommentArchiveEntry(comment)
|
||||
@@ -27,13 +33,16 @@ def test_get_comment_details(test_comment_id: str, expected_dict: dict, reddit_i
|
||||
|
||||
@pytest.mark.online
|
||||
@pytest.mark.reddit
|
||||
@pytest.mark.parametrize(('test_comment_id', 'expected_min_comments'), (
|
||||
('gstd4hk', 4),
|
||||
('gsvyste', 3),
|
||||
('gsxnvvb', 5),
|
||||
))
|
||||
@pytest.mark.parametrize(
|
||||
("test_comment_id", "expected_min_comments"),
|
||||
(
|
||||
("gstd4hk", 4),
|
||||
("gsvyste", 3),
|
||||
("gsxnvvb", 5),
|
||||
),
|
||||
)
|
||||
def test_get_comment_replies(test_comment_id: str, expected_min_comments: int, reddit_instance: praw.Reddit):
|
||||
comment = reddit_instance.comment(id=test_comment_id)
|
||||
test_entry = CommentArchiveEntry(comment)
|
||||
result = test_entry.compile()
|
||||
assert len(result.get('replies')) >= expected_min_comments
|
||||
assert len(result.get("replies")) >= expected_min_comments
|
||||
|
||||
Reference in New Issue
Block a user