249 Commits

Author SHA1 Message Date
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
Elrond
56dc1c9d3e Add base class for Meddleware
Created a BaseMeddleware which all Meddleware should derive
from. This is not strictly needed, but will greatly help.

The base class has the common __init__ of all the other
Meddlwares and fall backs for all hooks. That way a new
Meddlware only needs to override what it actually wants to
implement.
2011-11-25 22:16:18 +01:00
Christopher Allan Webber
ce5ae8da19 Rename MediaGoblin middleware to meddleware to avoid confusion w/ wsgi middleware
hehehehehe, "meddleware"
2011-11-25 12:13:56 -06:00
Joar Wandborg
0bce749b21 Fixes after merging video into master - part 2
- Added handling of InvalidFileType to submit.views
- Updated test_celery_setup and test_submission tests to reflect the changes to the
  media procesing infrastructure
2011-11-21 23:38:31 +01:00
Christopher Allan Webber
e56e5f8c5c Tests for StorageInterface*.copy_local_to_storage() 2011-11-20 22:25:22 -06:00
Jakob Kramer
c8ccd23e8e added unittests, now using form errors and fixed bug when no GET parameter is given for /edit/profile/ 2011-11-20 00:37:19 +01:00
Elrond
eabe6b678a Dot-Notation for "_id"
Note: Migrations can't use "Dot Notation"!

Migrations run on pymongo, not mongokit.
So they can't use the "Dot Notation".
This isn't really a big issue, as migrations are anyway
quite mongo specific.
2011-11-15 11:32:13 +01:00
Elrond
8daf78db4e Merge branch 'idea/check_mgoblin_static'
* idea/check_mgoblin_static:
  Move TestingMiddleware to tests/tools.py
  Some docs for the TestingMiddleware
  591: Let Testing Middleware check for staticdirect() usage
2011-11-12 13:39:50 +01:00
Elrond
33d11e995d Move TestingMiddleware to tests/tools.py
This middleware isn't needed outside of the tests, so let's
just put it there.
2011-11-12 13:21:41 +01:00
Elrond
34b0874d9a Some docs for the TestingMiddleware
To make the TestingMiddleware actually more useful in the
future, start to document it.
2011-11-12 13:10:48 +01:00
Elrond
733dc2c275 Change unit tests to use add_table_field
One of the test migrations adds a field. So rewrite it to
use the new add_table_field helper function.  This is a
good test for it.
2011-10-22 00:21:25 +02:00
Elrond
91b89bde47 591: Let Testing Middleware check for staticdirect() usage
All references to static, shipped content should go via
request.staticdirect().

So insert a TestingMiddleware in the chain, which tests for
this on all requests/reponses happening in the test suite.
It's a simple text search for a bogus usage pattern.
2011-10-19 21:37:19 +02:00
Elrond
adf7945081 Hotfix: Renaming cookie broke unit tests
The name of the cookie was hardcoded in the unit tests and
while renaming the cookie this part was missed.

So now read the cookie_name from the config in the test.
This also tests for the config item existing!
2011-10-16 00:25:59 +02:00
Christopher Allan Webber
b43b17fc26 Merge remote branch 'remotes/aaronw/bug444_fix_utils_py_redux'
Conflicts:
	mediagoblin/util.py
2011-10-01 21:27:36 -05:00
Aaron Williamson
152a3bfaa3 Finished splitting util.py into separate files. 2011-10-01 18:05:44 -04:00
Nathan Yergler
4f475d3024 #361 Unit tests for CSRF Middleware 2011-10-01 14:21:02 -07:00
Aaron Williamson
ae3bc7fabf Moved common, translation, template, and url code out of util.py and into tools/[file].py 2011-10-01 09:31:42 -04:00
Joar Wandborg
a2468d18ca Feature #587 - Split storage.py into submodules
*   Removed storage.py
*   Created submodules for filestorage, cloudfiles, mountstorage
*   Changed test_storage to reflect the changes made in the storage
    module structure
*   Added mediagoblin.storage.filestorage.BasicFileStorage as a
    default for both publicstore and queuestore's `storage_class`
2011-09-12 02:32:03 +02:00
Christopher Allan Webber
f373599bd7 Merge branch 'gullydwarf-cfdv-f357_lost_password_functionality'
Conflicts:
	mediagoblin/auth/routing.py
2011-09-08 08:12:43 -05:00
Christopher Allan Webber
f03fef4ea8 Updating calls to recall password URLs to respect changed routing 2011-09-07 23:23:26 -05:00
Christopher Allan Webber
273227e399 Merge branch 'i507_beaker_cache' 2011-09-05 23:28:41 -05:00
Christopher Allan Webber
fc21a55c76 Turning on caching for mediagoblin testing after all?
Maybe we'll add a way to toggle this.
2011-09-05 23:28:11 -05:00
Christopher Allan Webber
9a64272e48 Fixing the confirm delete unit test
Now it's updated for the new checkbox-for-confirm code.
2011-09-05 23:20:50 -05:00
Christopher Allan Webber
284ebca0b2 Caching test... pretty basic. 2011-09-05 22:57:52 -05:00
Caleb Forbes Davis V
4bcaf9f32a for readability, and adds unit test for expired token 2011-09-05 18:57:06 -05:00
Caleb Forbes Davis V
65a8304794 added unit tests for lost password code 2011-09-05 17:33:01 -05:00
Will Kahn-Greene
12a100e4d8 508. Updates copyright/license information 2011-09-01 20:50:19 -04:00
Joar Wandborg
502073f2bf Feature #403 - Ability to delete media entries - Fixes according to feedback
*   Moved `mediagoblin.confirm` stuff to `mediagoblin.user_pages`,
    templates too.
*   Removed route extension for `mediagoblin.confirm`
*   Created `delete_media_files` which deletes all media files
    on the public_store when the entry is deleted
*   Created a new decorator to check if a user has the permission
     to delete an entry.
2011-08-30 23:16:46 +02:00
Joar Wandborg
afe4e513f7 Added tests for delete/confirm_delete 2011-08-30 21:46:47 +02:00
Christopher Allan Webber
0533f117a9 Basic beaker caching functionality added to the application. 2011-08-23 23:22:17 -05:00
Christopher Allan Webber
12c340fc07 Static serving in test_paste.ini wasn't pointing at test_user_dev either
Not that it matters too much, but... should point it to the right
place :)
2011-08-23 23:20:20 -05:00
Christopher Allan Webber
ba880861c3 Must switch queuestore_base_dir -> base_dir in test_mgoblin_app.ini 2011-08-23 22:56:22 -05:00
Christopher Allan Webber
63c9a0c766 Updating tests for new storage config code 2011-08-21 15:14:45 -05:00
Christopher Allan Webber
68f3ffbe82 Malicious uploads test with fake but not really image files working! :) 2011-08-14 09:12:43 -05:00
Christopher Allan Webber
0419d0da24 get_test_app() should turn on testing buckets 2011-08-01 09:11:14 -05:00
Christopher Allan Webber
a656ccd561 Updating tests to reflect we redirect to the user's page after verification now. 2011-08-01 08:34:50 -05:00