134 Commits

Author SHA1 Message Date
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
Christopher Allan Webber
bc0b10d177 Updating tests to reflect not having a 'tags_case_sensitive' option.
I should probably update the tags of things when I change them.
2011-07-30 22:15:54 -05:00
Christopher Allan Webber
1b89b817e5 Removing option to make tags lowercase
...that's basically handled by the slugification
2011-07-30 21:54:18 -05:00
Christopher Allan Webber
ae31c36439 Merge remote branch 'remotes/gullydwarf-cfdv/f360_tagging' into mergetags
Conflicts:
	mediagoblin/tests/test_submission.py
2011-07-30 13:37:33 -05:00
Caleb Forbes Davis V
8ff4dec742 Adds tag unit testing
- overrides default tag parsing globals in test_mgoblin_app.ini
- piggybacks on existing test_submission code to check correct tag
  parsing and storage in the database
- verifies expected behavior given different delimiters, case
  sensitivities, tags that are too long, and extra whitespace
- verifies list-of-dict database storage and tag slugification
2011-07-29 14:04:49 -05:00
Christopher Allan Webber
f73f4c4b84 Log in user after regitration 2011-07-29 08:43:59 -05:00
Christopher Allan Webber
0bc036209d Redirect to the user's profile after registration
- Updated the view
 - Updated the tests
 - Fixed a weirdness in the registration view where the 'user'
   variable used to be called 'entry'
2011-07-29 08:22:26 -05:00
Christopher Allan Webber
dd33ed06fb Finished the docstring of the creature_add_magical_powers fake migration 2011-07-17 11:32:05 -05:00
Christopher Allan Webber
8e9331c106 Merge remote branch 'remotes/cmoylan/test_submission_views_365' 2011-07-16 15:05:54 -05:00
Christopher Allan Webber
77fb1e1331 A couple of tests related to migrations_to_run()
Includes a test making sure an exception is raised if
current_migration not set in database
2011-07-13 21:09:04 -05:00
Chris Moylan
3d073d48cb Merge branch 'master' into test_submission_views_365 2011-07-10 22:45:52 -05:00
Chris Moylan
9df37e8a4a added suggestions as per http://bugs.foocorp.net/issues/365#note-9 2011-07-10 22:45:27 -05:00
Christopher Allan Webber
9548c6463b test_migrations_recorded_as_(latest|zero) tests passing :) 2011-07-10 21:51:02 -05:00
Christopher Allan Webber
01040b78e1 test_run_partial_migrations() working! 2011-07-10 21:29:23 -05:00
Christopher Allan Webber
85663692cd testing tools install_fixtures_simple and assert_db_meets_expected
Thought I installed these... guess I didn't!
2011-07-10 21:16:50 -05:00
Christopher Allan Webber
ae6b0a4e6e test_run_full_migrations() all working properly! 2011-07-10 21:14:38 -05:00