aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/tests')
-rw-r--r--mediagoblin/tests/test_api.py2
-rw-r--r--mediagoblin/tests/test_misc.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/mediagoblin/tests/test_api.py b/mediagoblin/tests/test_api.py
index 33b93208..90873cb9 100644
--- a/mediagoblin/tests/test_api.py
+++ b/mediagoblin/tests/test_api.py
@@ -317,7 +317,7 @@ class TestAPI(object):
# Find the objects in the database
media = MediaEntry.query.filter_by(public_id=data["object"]["id"]).first()
- comment = media.get_comments()[0]
+ comment = media.get_comments()[0].comment()
# Tests that it matches in the database
assert comment.actor == self.user.id
diff --git a/mediagoblin/tests/test_misc.py b/mediagoblin/tests/test_misc.py
index 34235209..5500a0d7 100644
--- a/mediagoblin/tests/test_misc.py
+++ b/mediagoblin/tests/test_misc.py
@@ -64,13 +64,13 @@ def test_user_deletes_other_comments(test_app):
usr_cnt1 = User.query.count()
med_cnt1 = MediaEntry.query.count()
- cmt_cnt1 = TextComment.query.count()
+ cmt_cnt1 = Comment.query.count()
User.query.get(user_a.id).delete(commit=False)
usr_cnt2 = User.query.count()
med_cnt2 = MediaEntry.query.count()
- cmt_cnt2 = TextComment.query.count()
+ cmt_cnt2 = Comment.query.count()
# One user deleted
assert usr_cnt2 == usr_cnt1 - 1
@@ -83,7 +83,7 @@ def test_user_deletes_other_comments(test_app):
usr_cnt2 = User.query.count()
med_cnt2 = MediaEntry.query.count()
- cmt_cnt2 = TextComment.query.count()
+ cmt_cnt2 = Comment.query.count()
# All users gone
assert usr_cnt2 == usr_cnt1 - 2