555 Commits

Author SHA1 Message Date
vijeth-aradhya
f1cdf74202 Change complimentary_task to complementary_tas
Closes #11
2017-08-29 11:26:12 +05:30
vijeth-aradhya
170cd28f9e Create a seperate test for get_all_media 2017-08-17 17:57:29 +05:30
vijeth-aradhya
283043f14d Add test for get_all_media()
Check for it's returned values.
2017-08-16 21:52:22 +05:30
Vijeth Aradhya
2bb617fa9e Merge branch 'master' into 'multiple-qualities-frontend'
Add multiple video qualities feature

See merge request !2
2017-08-14 12:08:36 +00:00
vijeth-aradhya
fe40b02e7d Fix test_accepted_resolutions
Add {'webm': (640, 640)}
2017-06-27 01:04:55 +05:30
vijeth-aradhya
7fc550cf2b Test whether video is transcoded to all resolutions
After `self.check_normal_upload`, query the database and
check whether the video got transcoded to all the required
resolutions.
2017-06-25 19:32:28 +05:30
vijeth-aradhya
ac966b232b Test accepted_files and accepted_resolutions 2017-06-25 18:47:04 +05:30
vijeth-aradhya
ee2b53dea1 Add test_chord for TestSubmissionVideo
Testing the arguments passed to celery.chord when
a video is submitted.
2017-06-25 18:31:50 +05:30
vijeth-aradhya
2771f4678a Add VideoProcessingManager.workflow() tests
Testing workflow method including its return data.
2017-06-25 02:05:56 +05:30
Boris Bobrov
c159eeaffe Remove mongodb-related stuff
We dropped mongodb a long time ago
2017-06-18 17:08:30 +03:00
vijeth-aradhya
52814967cd Fix test_celery_setup error
Add mediagoblin.media_types.video.processing as a task module.
2017-06-17 01:58:58 +05:30
Boris Bobrov
c3356889c9 Fix tests to reflect that we've moved to amqp 2017-06-10 12:22:58 +03:00
Ben Sturmfels
e17566b3c3 Extend Paginator tests to satisfy #55. 2016-09-16 09:24:56 +03:00
Ben Sturmfels
58b3a65e53 Add Python 3 support in pagination.
This issue was visible when attempting to view the home page of a MediaGoblin site with more than a single page worth of items, under Python 3.
2016-09-16 09:24:56 +03:00
Boris Bobrov
4fcd2e756d Merge branch 'fix-unhelpful-smtp-error-5081' 2016-07-25 03:59:49 +03:00
Jonathan Sandoval
caee9aa2e3 squash! Custom exception in mail. 2016-04-08 13:17:26 -05:00
Jonathan Sandoval
9d37bcd06f Mail tests with no mail server configured. 2016-04-08 13:07:06 -05:00
Jonathan Sandoval
bf2f121a83 Tests for short and long usernames. 2016-04-07 16:29:15 -05:00
Jonathan Sandoval
d756206541 Test with short and long username 2016-04-07 11:55:45 -05:00
Christopher Allan Webber
9e75d4c712 tests: Fix migration tests; foundations are now installed separately
* mediagoblin/tests/test_sql_migrations.py: Import migration.changeset
  even in python 3.
  (FOUNDATIONS): Removed.
  (test_set1_to_set3): Removed foundations checks.
2016-03-29 14:41:57 -07:00
Christopher Allan Webber
c451cd0a6a tests: importorskip migration tests on "migrate" rather than on Python 3
Previously we assumed we wouldn't run migration tests if we're on
Python 3, but now that we support sqlalchemy-migrate with Python 3,
switch to checking based on "migrate" importability.

* mediagoblin/tests/test_sql_migrations.py: Update test skipping to
  rely on "migrate" module presence rather than Python 3 check.
2016-03-29 14:27:07 -07:00
Christopher Allan Webber
8b7343c611 Add comment questioning why run_dbupdate is needed in get_app test utility
* mediagoblin/tests/tools.py (get_app): Add comment
2016-03-26 11:39:08 -07:00
Christopher Allan Webber
0ce775ac2a Remove requirement that audio/video dependencies must be installed for tests
Some tests were added for running audio and video submission tests in
test_submission.py.  Unfortunately these were not skipped if these
dependencies were not installed.  This patch attempts to fix that while
leaving the tests intact.
2016-03-18 12:32:22 -07:00
Jessica Tallon
161bc6b2c1 Fix #5376 - Ensure links have correct ID
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.
2016-03-01 12:04:08 +00:00
Jessica Tallon
2104c3e0f2 Fix #5415 - Deleted comments get removed properly when tombstones
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.
2016-02-29 15:40:34 +00:00
Jessica Tallon
6efcab2d69 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.
2016-02-29 12:33:51 +00:00
Christopher Allan Webber
410ab9cacd Oops, I forgot to include test_mgoblin_app_pdf.ini 2016-02-24 17:52:15 -08:00
Christopher Allan Webber
d61778a489 Switch from Paste for serving to Waitress
Incredibly, it looks like none of our documentation has to change taking
this route...!
2016-02-19 10:22:14 -08:00
Christopher Allan Webber
cd4a7492cd Fixing one more bytes vs string battle in Python 3 2016-02-11 11:36:05 -08:00
Christopher Allan Webber
64b989a756 #5416: Fix tests using the FileObjectAwareFile 2016-02-11 11:21:44 -08:00
Loic Dachary
679f729221 Fix #5079 - tags unicity is on the slug, not the name
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Andrew Browning <ayleph@thisshitistemp.com>
2016-02-06 14:33:49 -05:00
Christopher Allan Webber
5573c41054 Issue #5349: Submission tests fail confusingly on missing dependency
They gave a DetachedInstanceError, despite being totally unrelated to
anything in database-land!
2016-02-04 15:40:28 -08:00
Loic Dachary
7c9af02ab6 Fix #5408 - ignore non-int offset in api feed
In the same fashion limit=BAD fallsback to the default value,
fallback to zero when offset=WORSE.

Also add test coverage verifying limit/offset do the right thing.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-01-25 12:09:19 -08:00
Loic Dachary
bbe0855651 Fix #1096 - allow - in usernames
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-01-21 11:56:41 -08:00
Ben Sturmfels
2fdc14a242 trac#5397: Allow decode_request to parse content-type headers with extra options.
It previously parsed "Content-Type: application/x-www-form-urlencoded", but not "Content-Type: application/x-www-form-urlencoded; charset=utf-8".
2016-01-21 10:53:54 -08:00
Loic Dachary
8b4645dfd4 Fix #1099 - remove x mode from ini file
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-01-19 17:28:13 -08:00
tom
43cf0a68f2 Add test to check that an activity is created when a collection was chosen. 2016-01-07 11:04:13 -08:00
tom
5f60a4550d Add collection drop down to submit page. 2016-01-07 11:04:11 -08:00
Christopher Allan Webber
600a170ecf Fix issue #5372: test_comment_notification fails with werkzeug 0.11 or newer
Formerly like:
   chris commented on your post (​http://localhost:80/u/otherperson/m/some-title/c/1/#comment) at GNU MediaGoblin

With werkzeug 0.11.0 or higher:
    chris commented on your post (​http://localhost/u/otherperson/m/some-title/c/1/#comment) at GNU MediaGoblin

Easy enough just to be flexible.
2015-12-10 11:29:20 -06:00
Jessica Tallon
0d053bff98 Added test for #5356 - Read someone else's feed
This adds a test and improves a previous test for the ability to read
someone elses feed. Previously it was not possible however this has
since been patched and this test checks for that.
2015-11-24 10:45:23 +00:00
Ben Sturmfels
68c963d6f5 trac#687: Add unit tests for redirect and redirect_obj. 2015-11-05 15:43:41 -06:00
Ben Sturmfels
f51fd67a06 trac#665: Upgrade to WebTest 2.0.18 and fix broken test test_csrf_cookie_set.
Test was failing due to API change in WebTest around accessing cookies set in the test client. These are now in `test_app.cookies`.

While there are currently 48 other tests failing, I've verified that before and after this change that the same number fail. I've also checked that no other tests use the old API for accessing test client cookies.

I've pinned to version 2.0.18. My understanding is that it's generally a good idea to pin to a specific version where possible to avoid the "why has this suddenly broken" type bugs. This also seems appropriate since WebTest appears to be very stable.
2015-11-05 15:13:44 -06:00
Jessica Tallon
64a456a4e5 Comment changes for federation
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.
2015-10-20 12:24:54 +00:00
Jessica Tallon
d216d771f6 Add public_id fixes throughout the code
This adds several things, mainly code which checks for the public id and
if it doesn't exist generating it where it can. This is to because we
need to keep the public_id to be able to effectively soft delete models.

This also adds a public_id field to the Activity along with a migration.
2015-10-07 15:07:54 +02:00
Jessica Tallon
0f3bf8d4b1 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
2015-10-07 14:40:44 +02:00
Jessica Tallon
80ba8ad1d1 Fix bugs with the exifread library update
- As of version 2.1.2 of exifread the 90 CW and 90 CCW values were
  swapped, this bug is now fixed however our test data had those values
  swapped too. I have fixed that.

- I also noticed that I had different orientation values, this was
  noticed and fixed for some other differing values in commit ccca39f1
  when it was decided we'll add values which were noticed on different
  platforms.
2015-10-07 13:52:30 +02:00
Jessica Tallon
b4997540dc Fix some unit tests and bugs
This fixes a lot of the issues with the LocalUser changes that were
merged recently. There was a problem where the attributes of LocalUser
were not being eagerly loaded and because the Session was detached an
exception was being raised when they were accessed.

This also fixes some typo's which were introduced.

Finally this adds a temporary fix for a potential SQLAlchemy bug, this
is a bug where doing:

    User.query.filter(LocalUser.username == "some_username").first()

does NOT yeild a user with the username "some_username" but all users
on the site. The temp fix is to just query the LocalUser, this should
be resolved when bug is confirmed and fixed upstream.
2015-08-24 21:07:06 +02:00
Jessica Tallon
d88fcb03e2 Change codebase to query or create correct User model
The code base had many references to User.username and other
specific to LocalUser attributes as that was the way it use to exist.
This updates those to query on the generic User model but filtering
by attributes on the LocalUser.
2015-07-31 15:15:24 +02:00
Jessica Tallon
2d73983e8c Fix some problems with activity mixins and migrations 2015-05-26 16:48:59 +02:00
ayleph
c975bd3740 Use UTC for all timesince comparisons
Signed-off-by: Jessica Tallon <jessica@megworld.co.uk>
2015-03-12 16:28:14 +01:00