aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests
diff options
context:
space:
mode:
authorJessica Tallon <tsyesika@tsyesika.se>2016-02-29 12:03:41 +0000
committerJessica Tallon <tsyesika@tsyesika.se>2016-02-29 12:33:51 +0000
commit6efcab2d69c5745c2ea9616302a08e38a5af3de6 (patch)
tree4844f7d68854db032ef9c2588adf819de3a291d8 /mediagoblin/tests
parent6d38b1858c73cd7154c9fdabdc17594a820d311b (diff)
downloadmediagoblin-6efcab2d69c5745c2ea9616302a08e38a5af3de6.tar.lz
mediagoblin-6efcab2d69c5745c2ea9616302a08e38a5af3de6.tar.xz
mediagoblin-6efcab2d69c5745c2ea9616302a08e38a5af3de6.zip
Change Notification.object_id to be ID of Comemnt not TextComment
This shouldn't really effect much but it is a needed change for the future this changes the Notification.object_id to be the ID of the Comment (the link table to the comment object) rather than TextComment (the comment object itself). This is needed as now comments can be other things, other than TextComment.
Diffstat (limited to 'mediagoblin/tests')
-rw-r--r--mediagoblin/tests/test_notifications.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/tests/test_notifications.py b/mediagoblin/tests/test_notifications.py
index 19bf8665..776bfc71 100644
--- a/mediagoblin/tests/test_notifications.py
+++ b/mediagoblin/tests/test_notifications.py
@@ -110,8 +110,8 @@ class TestNotifications:
assert notification.seen == False
assert notification.user_id == user.id
- assert notification.obj().get_actor.id == self.test_user.id
- assert notification.obj().content == u'Test comment #42'
+ assert notification.obj().comment().get_actor.id == self.test_user.id
+ assert notification.obj().comment().content == u'Test comment #42'
if wants_email == True:
# Why the `or' here? In Werkzeug 0.11.0 and above
@@ -142,7 +142,7 @@ otherperson@example.com\n\nSGkgb3RoZXJwZXJzb24sCmNocmlzIGNvbW1lbnRlZCBvbiB5b3VyI
# Save the ids temporarily because of DetachedInstanceError
notification_id = notification.id
- comment_id = notification.obj().get_comment_link().id
+ comment_id = notification.obj().id
self.logout()
self.login('otherperson', 'nosreprehto')