Merge branch 'master' into derek-moore-bug405_email_notifications_for_comments

Conflicts:
	mediagoblin/db/mongo/migrations.py
This commit is contained in:
Christopher Allan Webber
2012-03-18 12:12:41 -05:00
37 changed files with 4497 additions and 76 deletions

View File

@@ -180,6 +180,18 @@ class TestSubmission:
# Does media entry exist?
assert_true(media)
# Add a comment, so we can test for its deletion later.
get_comments = lambda: list(
request.db.MediaComment.find({'media_entry': media._id}))
assert_false(get_comments())
response = self.test_app.post(
request.urlgen('mediagoblin.user_pages.media_post_comment',
user=self.test_user.username,
media=media._id),
{'comment_content': 'i love this test'})
response.follow()
assert_true(get_comments())
# Do not confirm deletion
# ---------------------------------------------------
response = self.test_app.post(
@@ -219,6 +231,9 @@ class TestSubmission:
request.db.MediaEntry.find(
{'_id': media._id}).count())
# How about the comment?
assert_false(get_comments())
def test_malicious_uploads(self):
# Test non-suppoerted file with non-supported extension
# -----------------------------------------------------