384 Commits

Author SHA1 Message Date
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
Elrond
eab23e38d0 Merge remote branch 'remotes/joar/tests'
* remotes/joar/tests:
  Fixed broken confirm_password test
2011-12-31 21:57:51 +01:00
Joar Wandborg
a246ccca69 ASCII media type support & fix a bug in file submission error handling
* Added ASCII media processing
* Added ASCII media display
* Added ASCII media type

Rebased from Joar Wandborg's ascii art branch (squashed to remove the
commits borrowing code of dubious license)

Fixed a bug in file submission error handling:
 - Moved file-extension condition out of loop (what did it do there?)
 - Updated file submission tests
 - Changed error handling in file submission, should now report more
   than absolutely necessary.
2011-12-31 10:32:52 -06:00
Joar Wandborg
7c7ba01ee3 Fixed broken confirm_password test 2011-12-30 19:11:47 +01:00
Elrond
faf74067da Move db/migrations.py -> db/mongo/migrations.py
And change references.
2011-12-20 20:33:33 +01:00
Elrond
59bd06aabb Move db/util.py -> db/mongo/util.py
- Change some reference
- Provide a wrapper db/util.py
2011-12-20 19:35:47 +01:00
Elrond
4ec5717a17 Dot-Notation: tests/test_edit.py
convert tests/test_edit.py over to Dot-Notation. It only
accesses the User object.
2011-12-05 21:08:58 +01:00
Elrond
2d540fed8b Dot-Notation for Users.fp_token_expire 2011-12-05 21:08:58 +01:00
Elrond
dc39e4555c Dot-Notation for Users.fp_verification_key 2011-12-05 21:08:58 +01:00
Elrond
00bb95502e Dot-Notation for Users.verification_key 2011-12-05 21:08:57 +01:00
Elrond
7a3d00ec21 Dot-Notation for Users.status 2011-12-05 21:08:57 +01:00
Elrond
4facc7a0a2 Dot-Notation for Users.email_verified 2011-12-05 21:08:57 +01:00
Elrond
9047b254f3 Dot-Notation for Users.pw_hash 2011-12-05 21:08:57 +01:00
Elrond
809cbfc5ab Dot-Notation for Users.email 2011-12-05 21:08:57 +01:00
Elrond
5a4e3ff1e2 Dot-Notation for Users.username 2011-12-05 21:08:57 +01:00
Christopher Allan Webber
bcc9ee3205 Update the delete item to use the _id after all... it's the safest way.
See http://bugs.foocorp.net/issues/695
2011-12-05 08:35:42 -06:00
Christopher Allan Webber
04b0b7a124 Merge remote-tracking branch 'remotes/lorochka85/bug852_use_media_slug_instead_of_id'
Conflicts:
	mediagoblin/decorators.py
	mediagoblin/templates/mediagoblin/user_pages/media.html
	mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html
2011-12-04 23:14:08 -06:00
Elrond
ea5a5b15a3 Merge branch 'misc/fixture_add_user'
* misc/fixture_add_user:
  fixture_add_user: Factoring a unit test tool
2011-12-04 14:59:33 +01:00
Elrond
6603b30041 Merge remote branch 'remotes/manolinux/671_spaces_in_tag_list_edit'
* remotes/manolinux/671_spaces_in_tag_list_edit:
  * Feature #678: Drop custom delimiters in tags   * Eliminate the definition of the tag delimiter for tests.   * Remove a test that was related to custom tags delimiter. * Bug #671: Tags list on Edit page is not seperated by spaces and hard to read   * Modify a test to include this space.
  * Bug #671: Tags list on Edit page is not seperated by spaces and hard to read : Make 'media_tags_as_string' function put a space after each comma. * Feature #678: Drop custom delimiters in tags : I declare a constant in the begining of text.py file.
2011-12-03 22:11:54 +01:00
Elrond
968dd9e735 Bug #685: Add failing unit test
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.
2011-12-03 16:50:36 +01:00
Elrond
93e4622491 Expect 404 in unit tests, if we now use 404.
Our unit tests for auth were expecting a 400.
Well, now we give a 404. So expect that!

I'm not completely sure, if the 404 is the right thing
here, but that's another topic.
2011-12-02 00:09:13 +01:00
Elrond
9754802d4b fixture_add_user: Factoring a unit test tool
Some unit tests need a user in the database, especially to
act as that user.  Some routines did that on their own.  So
factored this whole thing into a new function and use it
around.
2011-12-01 23:33:47 +01:00
Manuel Urbano Santos
d5bb51f9d4 * Feature #678: Drop custom delimiters in tags
* Eliminate the definition of the tag delimiter for tests.
  * Remove a test that was related to custom tags delimiter.
* Bug #671: Tags list on Edit page is not seperated by spaces and hard to read
  * Modify a test to include this space.
2011-11-27 13:55:07 +01:00
Nathan Yergler
ca9ebfe2e0 Issue 680 Allow decorating views to prevent CSRF protection. 2011-11-26 15:32:35 -08:00