407 Commits

Author SHA1 Message Date
Brett Smith
c0e87ec9d2 Refactor normal upload tests.
This is nice because it means we do *all* the normal sanity tests for *all*
the normal uploads.  check_url() can be used in other tests too.
2012-03-20 22:30:57 -04:00
Brett Smith
77445d13ad Refactor MediaEntry fetches/checks into check_media(). 2012-03-20 22:16:28 -04:00
Brett Smith
31dd6013b8 Refactor data posts into one do_post function.
All the data posts in these tests had a lot of common code.  Putting all
that into a function makes it easier to write more tests (which I'll be
doing in a bit) and see what's really being tested.
2012-03-20 22:07:32 -04:00
Christopher Allan Webber
94e6052375 Merge branch 'master' into derek-moore-bug405_email_notifications_for_comments
Conflicts:
	mediagoblin/db/mongo/migrations.py
2012-03-18 12:12:41 -05:00
Brett Smith
a0a7f87f62 When media is deleted, delete associated comments too.
The actual code is just a simple for loop; there might be a better
implementation but this is a fine start.  I also extended test_delete to
check this too.
2012-03-17 17:53:00 -04:00
Derek Moore
252eaf21d5 These are changes for issue #405, add email comment notification. 2012-03-15 16:38:56 -07:00
Joar Wandborg
10085b7739 Audio thumbnailing & spectrograms, media plugins use sniffing
* Added extlib/freesound/audioprocessing.py
* config_spec
  * Added create_spectrogram setting
  * Added media:medium and media:thumb max_{width,height} settings
* Added sniffing logic to
  - audio.processing:sniff_handler
  - video.processing:sniff_handler
* Changed audio.processing:sniff_handler logic
* Added audio thumbnailing functionality to audio.processing
  (works only with create_spectrogram enabled)
* Refractored contexts in audio.processing
* Added audio.transcoders:AudioThumbnailer
  Used for creating spectrograms and spectrogram thumbnails -
  Wadsworth's Constant, we meet again :)
* audio.transcoders:AudioTranscoder
  - Added mux_string kwarg
  - Delete self.pipeline on self.halt()
* Changed str.format formatting in image.processing:sniff_handler
  Had {1} without an {0}, changed to {0}
* Refractored VideoTranscoder to use transcode() for transcoding instead
  of __init__()
* Added discover() method to video.transcoders:VideoTranscoder
* Added spectrogram display to media_displays/audio.html
* Updated test_submission to reflect changes in media plugin delegation
2012-02-28 21:59:38 +01:00
Christopher Allan Webber
e9f87f728c Fix tests given recent celery "case" change 2012-02-28 13:31:03 -06:00
Elrond
34344f1d85 Merge remote-tracking branch 'cwebber/celerysql'
* cwebber/celerysql:
  Adjust unit tests to match new celery/kombu sqlalchemy setup
  "database" is not the sqlalchemy kombu transport... should be "sqlalchemy"
  Celery and kombu databases should also be .gitignore'd
  kombu-sqlalchemy a requirement in order for kombu sqlalchemy transport to work
  Move mediagoblin dbs out of user_dev for race condition directory-creation reasons.
  Give kombu its own db.  Responding to Elrond "sqlite will lock all the time!" :)
  Apparently an absolute path is three slashes after sqlite:.  Thx elrond.
  Should be all that's needed to switch celery/kombu settings to sqlalchemy
2012-02-27 21:55:02 +01:00
Christopher Allan Webber
a9a63a686e Adjust unit tests to match new celery/kombu sqlalchemy setup 2012-02-26 15:45:58 -06:00
Elrond
8efcd40558 Dot-Notation: MediaComment and some random places 2012-02-26 19:19:48 +01:00
Christopher Allan Webber
d2506eebb4 Commenting out the migrations that don't exist yet 2012-02-18 23:19:41 -06:00
Christopher Allan Webber
63352aaf70 Merge branch 'master' into sqlmigrate
Conflicts:
	mediagoblin/db/sql/models.py
2012-02-18 10:01:47 -06:00
Will Kahn-Greene
7f4ebeed76 Fix copyright statements; add LICENSE for EXIF.py 2012-02-08 10:47:08 -05:00
Elrond
ccca39f1d8 Fix EXIF based image rotation test
The test checks for a pixel value after rotation (good
idea!). But the value seems to be a bit different on some
platforms, so use a list of seen values.

Not the perfect solution, but it works.
2012-02-04 21:37:05 +01:00
Christopher Allan Webber
cf29e8a824 It's 2012 all up in here 2012-02-02 09:44:13 -06:00
Christopher Allan Webber
7f3ec607a3 Explained why migration #1 commented out. 2012-01-29 22:19:53 -06:00
Christopher Allan Webber
78d17b8055 Excepting that migration 1 doesn't work(!), sqlalchemy migration branch working
The reason migration 1 doesn't work, and is commented out, is because
of sqlalchemy-migrate not handling certain constraints while dropping
binary sqlite columns right.  See also:
http://code.google.com/p/sqlalchemy-migrate/issues/detail?id=143&thanks=143&ts=1327882242
2012-01-29 22:19:03 -06:00
Christopher Allan Webber
e920b96859 db_conn.engine -> db_conn.bind 2012-01-29 17:28:25 -06:00
Christopher Allan Webber
be1077ac44 Migration manager's current migration should be 3, not 7, after running all migrations! 2012-01-29 17:23:27 -06:00
Christopher Allan Webber
505c0db119 Fixed the descriptions for the necroplex! 2012-01-29 17:22:29 -06:00
Christopher Allan Webber
c7fa585bff assert column type from Unicode -> VARCHAR. SQLAlchemy reflection only so smart ;) 2012-01-29 17:21:44 -06:00
Christopher Allan Webber
ecb4cc8990 printer = CollectingPrinter -> printer = CollectingPrinter() 2012-01-29 17:11:41 -06:00
Christopher Allan Webber
245e6d83a6 CollectingPrinter is a class, not a function! 2012-01-29 17:10:18 -06:00
Christopher Allan Webber
0f3526c601 magical_powers relationship set on wrong table, fixed 2012-01-29 16:48:44 -06:00
Christopher Allan Webber
a5e03db6c2 Migration records are dicts, not lists. Fix SET1_MIGATIONS! 2012-01-29 16:39:08 -06:00
Christopher Allan Webber
e8e52b3a0b test_set1_to_set3() now has appropriate amount of code, even if it doesn't run :) 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
caed154af0 Fixing some obvious errors caught by pyflakes 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
5de0f4daf5 More stuff even yet per sql migration stuff! And still not ready! 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
690b51faa7 Closer to the end of this migration test... 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
94eff10deb unicode stuff and more bits on the actual migration method 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
40f0996ab9 A ton more work on the SQL migration unit tests... 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
09e2c48701 Wrote up some scaffolding for the actual tests 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
dc3db4681f Insert migration objects round 3 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
d6cdf64b4f Wrote some (semi-silly) descriptions of each migration 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
356654deb8 Docstrings for stage 2 migrations 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
d74a9483de Theoretical full set of migration2 objects to insert for testing 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
64d280647c Insert migration1 objects. Also, Level1 id from Integer->Unicode 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
248b5061ec All theoretical migrations written! 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
473e06053c binding migration metadata to engine, and level_exits_new_table should now work 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
89694d6d69 More test migration work. Closing to working migrations for set 2...
Also, this file is written in 2012, correct that ;)
2012-01-29 16:33:46 -06:00
Christopher Allan Webber
129c36be6f Might as well call it "set2 migrations" 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
0f10058fd3 A theoretical set of models to migrate about with, plus one migration ;) 2012-01-29 16:33:46 -06:00
Joar Wandborg
ebc0e38239 Resized a test_exif test image. 1.9M is unnecessarily large. 2012-01-28 18:53:36 +01:00
Joar Wandborg
63bd7c04bd Acts on feedback from Chris
- Added EXIF tests
- Removed pdb from image processing "ifmain"
- Fixed comment typo in image processing
- Removed unused import in tools.exif
2012-01-25 23:46:11 +01:00
Elrond
c2d6792ddb Test Suite: Enable attachments, add failing test
attachments are an optional part. But it doesn't hurt to
enable them in the test suite at all.

Also (with enabled attachmemtns) the main media view fails,
if one isn't logged in (joar found it!).  So add a simple
(currently failing) test for this.
2012-01-10 12:52:01 +01:00
Elrond
b48abba303 Fix Unit Tests for new password changing 2012-01-05 14:54:03 +01:00
Elrond
049284b1da Dot-Notation for MediaEntry.state 2012-01-04 11:57:39 +01:00
Elrond
445d811043 Fix unit tests for new forget password flow
After changing the password, the login page is now shown.
It contains a message.  (we can't test for that easily
currently.  There is a bug open on this problem.)

At least for the login page being shown now.
2012-01-01 19:20:38 +01:00
Joar Wandborg
4601c30c2e Fixed submission error handling and broken tests
- Fixed broken test_auth test
- Fixed error handling on submission, it now raises the exception
  if it is not explicitly relevant to file submission.
2011-12-31 22:57:08 +01:00