Skip to content

Commit d83d960

Browse files
committed
test: only check against Comment sources
We just removed strings, so they should not be allowed any more.
1 parent 10ed59c commit d83d960

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_comment.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_comment():
1515
comment = user.comments(limit=1)[0]
1616

1717
assert comment.id == "387076703"
18-
assert comment.source is sa.CommentSource.USER_PROFILE
18+
assert comment.source == sa.CommentSource.USER_PROFILE
1919
assert comment.source_id == "ScratchAttachV2"
2020
assert comment.parent_id is None
2121
assert comment.content == "Sample comment"
@@ -26,7 +26,7 @@ def test_comment():
2626
comment = proj.comments(limit=1)[0]
2727

2828
assert comment.id == 494890468
29-
assert comment.source in [sa.CommentSource.PROJECT, 'project']
29+
assert comment.source == sa.CommentSource.PROJECT
3030
assert comment.source_id == 1108326850
3131
assert comment.parent_id is None
3232
assert comment.content == ("<&;'!\n"
@@ -41,7 +41,7 @@ def test_comment():
4141
comment = studio.comments(limit=1)[0]
4242

4343
assert comment.id == 302129887
44-
assert comment.source in [sa.CommentSource.STUDIO, 'studio']
44+
assert comment.source == sa.CommentSource.STUDIO
4545
assert comment.source_id == 50809872
4646
assert comment.parent_id is None
4747
assert comment.content == "Sample"
@@ -53,7 +53,7 @@ def test_comment():
5353
comment = comment.replies(limit=1)[0]
5454

5555
assert comment.id == 302129910
56-
assert comment.source in [sa.CommentSource.STUDIO, 'studio']
56+
assert comment.source == sa.CommentSource.STUDIO
5757
assert comment.source_id == 50809872
5858
assert comment.parent_id == 302129887
5959
assert comment.commentee_id == 58743127

0 commit comments

Comments
 (0)