aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_api.py
diff options
context:
space:
mode:
authorJessica Tallon <tsyesika@tsyesika.se>2015-09-17 13:47:56 +0200
committerJessica Tallon <tsyesika@tsyesika.se>2015-10-07 14:40:44 +0200
commit0f3bf8d4b180ffd1907d1578e087522aad7d9158 (patch)
tree22279f7ff895047d1ec3c68bedb69a081cc0871a /mediagoblin/tests/test_api.py
parent80ba8ad1d1badb2f6330f25c540dc413e42e7d5c (diff)
downloadmediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.lz
mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.xz
mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.zip
Collection changes and migration for federation
- Adds a "type" column to the Collection object and allows the CollectionItem model to contain any object. - Changes "items" to "num_items" as per TODO - Renames "uploader", "creator" and "user" to a common "actor" in most places
Diffstat (limited to 'mediagoblin/tests/test_api.py')
-rw-r--r--mediagoblin/tests/test_api.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mediagoblin/tests/test_api.py b/mediagoblin/tests/test_api.py
index 83003875..b58e112f 100644
--- a/mediagoblin/tests/test_api.py
+++ b/mediagoblin/tests/test_api.py
@@ -190,7 +190,7 @@ class TestAPI(object):
# and self._upload_image.
id = int(data["object"]["id"].split("/")[-2])
media = MediaEntry.query.filter_by(id=id).first()
- media.uploader = self.other_user.id
+ media.actor = self.other_user.id
media.save()
# Now lets try and edit the image as self.user, this should produce a 403 error.
@@ -324,7 +324,7 @@ class TestAPI(object):
comment = media.get_comments()[0]
# Tests that it matches in the database
- assert comment.author == self.user.id
+ assert comment.actor == self.user.id
assert comment.content == content
# Test that the response is what we should be given
@@ -384,7 +384,7 @@ class TestAPI(object):
# change who uploaded the comment as it's easier than changing
comment_id = int(comment_data["object"]["id"].split("/")[-2])
comment = MediaComment.query.filter_by(id=comment_id).first()
- comment.author = self.other_user.id
+ comment.actor = self.other_user.id
comment.save()
# Update the comment as someone else.
@@ -597,4 +597,3 @@ class TestAPI(object):
model = MediaComment.query.filter_by(id=comment_id).first()
assert model.content == activity["object"]["content"]
-