aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_misc.py
Commit message (Collapse)AuthorAgeFilesLines
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-7/+7
|
* Fix #5376 - Ensure links have correct IDJessica Tallon2016-03-011-3/+3
| | | | | | | This ensures that links to comments have the correct ID (the ID of the Comment object) as well as fixing deletion on reports and fixing a few other little things. I hope this fixes the #5376 issue, though cannot reproduce so unable to confirm.
* Fix #5415 - Deleted comments get removed properly when tombstonesJessica Tallon2016-02-291-0/+31
| | | | | | The original wrapper existed and should be been removed, this fix now ensures the TextComment removes the Comment wrapper to prevent the deleted (comments which are tombstones) existing.
* Comment changes for federationJessica Tallon2015-10-201-9/+15
| | | | | | | | | | | | | | This adds a new Comment link table that is used to link between some object and then the comment object, which can be more or less any object in Mediagoblin. The MediaComment has been renamed to TextComment as that more aptly describes what it is. There is migrations for these changes. There is also the conslidation of the Report tables into a single Report table, the same with the Notification objects. This is because both of them split out MediaEntry and Comment versions into their own polymorphic versions from a base, this is no longer a meaningful distinction as comments can be anything.
* Collection changes and migration for federationJessica Tallon2015-10-071-1/+1
| | | | | | | - 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
* Fix #927 - Clean up federation code after Elrond's reviewJessica Tallon2014-07-301-0/+41
| | | | | | | | - Add json_error and use inplace of json_response where appropriate. - Add garbage_collection to config spec file. - Fix bugs in both garbage collection task and test - Handle /api/whoami when no user logged in and a test for such a case. - Validate ID is correct and user has comment privilege to comment.
* Fix the data integrity bug in test_misc.Christopher Allan Webber2013-06-221-2/+2
| | | | | | | | | | | | It turns out this has to do with some additions to the fixture adding of media entries. Since the new fake_upload field is True by default, adding multiple entries that have media_files at once meant that multiple additions of FileKeynames would be added at once if they were not saved at the same time. Tricky! Thankfully, Elrond helped us figure this one out. Thanks, Elrond :) And thanks also to Aapo Rantalainen for sponsoring this commit!
* New notificationsJoar Wandborg2013-06-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added request.notifications - Email configuration fixes - Set config_spec default SMTP port to `0` and switch to SSL/non-SSL default if `port == 0` - Added email_smtp_use_ssl configuration setting - Added migrations for notification tables - Added __repr__ to MediaComment(Mixin) - Added MediaComment.get_entry => MediaEntry - Added CommentSubscription, CommentNotification, Notification, ProcessingNotification tables - Added notifications.task to celery init - Fixed a bug in the video transcoder where pygst would hijack the --help argument. - Added notifications - views - silence - subscribe - routes - utility methods - celery task - Added half-hearted .active comment CSS style - Added quick JS to show header_dropdown - Added fragment template to show notifications in header_dropdown - Added fragment template to show subscribe/unsubscribe buttons on media/comment pages - Updated celery setup tests with notifications.task - Tried to fix test_misc tests that I broke - Added notification tests - Added and extended tests.tools fixtures - Integrated new notifications into media_home, media_post_comment views - Bumped SQLAlchemy dependency to >= 0.8.0 since we need polymorphic for the notifications to work
* Reverting "Always activate testing in every test module ever."Christopher Allan Webber2013-05-171-3/+0
| | | | | | Revert "Always activate testing in every test module ever." This reverts commit 0536306048daa0970d2e43411ba2a9bf073e570e.
* Always activate testing in every test module ever.Christopher Allan Webber2013-05-161-0/+3
| | | | Kind of a dorky way to implement this, but...
* Really removing nosetests things now! all assert_whatever removedChristopher Allan Webber2013-04-061-9/+7
|
* Switch test_app generation over to use py.test fixtures.Christopher Allan Webber2013-04-041-8/+4
| | | | | | | | | | | | By doing this, we can take advantage of py.test's ability to create temporary directories that are then cleaned up later during testing. This helps for sandboxing things. This also involves a ton of changes: - Changing the get_app stuff appropriately, getting rid of the setup_fresh_app decorator - Making said fixture - Switching over a billion tests to use it
* These tests need to have a MediaGoblin app setup so they can connect to the db!Christopher Allan Webber2013-04-031-0/+2
| | | | Thanks to py.test --boxed for helping discover that ;)
* Fix deleting media with attachments.Elrond2013-02-181-0/+15
| | | | | | | | | | | | | | If one deletes a media with attachments, there have been various problems: 1) If the file in the storage did not exist any more (maybe because due to a previous deletion attempt?), the error propagation failed, because the wrong thing was gathered. 2) The attachment database entries were not deleted. Using cascade for this, for now. Also add a simple unit test, that tests both by having a broken attachment on a media.
* Improve runtime of one test.Elrond2013-01-291-4/+10
| | | | Do not commit so often. flushing is enough.
* Failing testcase for issue 611.Elrond2013-01-291-1/+51
| | | | | | | | | | This currently fails (with foreign key constrain error): 1. Have user A and B. 2. User B creates media M. 3. User A post a comment on M. 4. User A deletes his own account. The test is a little bit wider.
* Rename get_test_app to get_app.Elrond2013-01-181-2/+2
| | | | | | | nosetests runs everything that even vaguely looks like a test case... even our get_test_app. And as it is imported everywhere... it is run everywhere as a test case. Renaming it saves us about 10+ tests and a few seconds of time.
* tests: More instances where a fresh database is not neededSebastian Spaeth2013-01-081-7/+5
| | | | Save test runtime by not dumping the databases when not needed.
* It's 2012 all up in hereChristopher Allan Webber2012-02-021-1/+1
|
* Bug #685: Add failing unit testElrond2011-12-031-0/+26
The simplest way to reproduce Bug #685 is to ask for a non existent page. This should return a proper 404. It currently doesn't. So add a unit test exactly for this. This unit test fails currently! It will fail until the bug gets fixed.