aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/tools.py
Commit message (Collapse)AuthorAgeFilesLines
...
* fixture_add_user: Factoring a unit test toolElrond2011-12-011-0/+17
| | | | | | | 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.
* Add base class for MeddlewareElrond2011-11-251-7/+2
| | | | | | | | | | 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.
* Rename MediaGoblin middleware to meddleware to avoid confusion w/ wsgi ↵Christopher Allan Webber2011-11-251-5/+5
| | | | | | middleware hehehehehe, "meddleware"
* Move TestingMiddleware to tests/tools.pyElrond2011-11-121-1/+45
| | | | | This middleware isn't needed outside of the tests, so let's just put it there.
* Some docs for the TestingMiddlewareElrond2011-11-121-0/+2
| | | | | To make the TestingMiddleware actually more useful in the future, start to document it.
* 591: Let Testing Middleware check for staticdirect() usageElrond2011-10-191-0/+6
| | | | | | | | | 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.
* Finished splitting util.py into separate files.Aaron Williamson2011-10-011-3/+3
|
* 508. Updates copyright/license informationWill Kahn-Greene2011-09-011-1/+1
|
* get_test_app() should turn on testing bucketsChristopher Allan Webber2011-08-011-0/+3
|
* testing tools install_fixtures_simple and assert_db_meets_expectedChristopher Allan Webber2011-07-101-0/+32
| | | | Thought I installed these... guess I didn't!
* Move config.py to init/Elrond2011-07-021-1/+1
| | | | | | | Some simple changes needed to do that. The interesting question left: Should config_spec.ini also be moved?
* Move mediagoblin.celery_setup -> mediagoblin.init.celeryElrond2011-07-021-4/+4
| | | | | | As the first target of the new .init. submodule move celery_setup there. Quite straight forward, just a lot of places to change.
* Celery wasn't really being properly connected during tests.Christopher Allan Webber2011-06-261-11/+4
| | | | | | | | | | | | | | | Lots of fixes to do this. - setup_celery_from_config no longer responsible for checking 'celery_setup_elsewhere'; that's the app's job. (This was a problem because more than the app was relying on using this function) - Allow us to specifically set the config file we're setting up celery from with setup_self - Set up celery_always_eager. This is something we strongly want while doing tests. - Instead of setting up the app in the get_test_app method, let's set that up simply by importing from_tests, which should itself up via from_celery being the environment variable being set.
* Extra checks so that we don't even RUN tests unless the right celery environ setChristopher Allan Webber2011-06-211-5/+11
|
* Make sure we *ONLY* ever kill the test database, EVER.Christopher Allan Webber2011-06-211-5/+2
|
* Also moving the test_server.ini to test_paste.ini to avoid ambiguity.Christopher Allan Webber2011-06-201-1/+1
|
* Need to run nosetests with CELERY_CONFIG_MODULE set to from_tests again.Christopher Allan Webber2011-06-191-3/+5
| | | | | Basically, if we don't do this celery sets itself up before it should and improperly. :\
* Nosetests should now be able to run using the new configobj / app init setupChristopher Allan Webber2011-06-181-16/+29
| | | | | | | | | Lots of changes: - CELERY_CONFIG_FILE does not need to be set to the from_tests module to run tests anymore, in fact it *should not be set at all* and is specifically forbidden. - moved around the configuration to the new 2-file format - and generally adjusting the code appropriately.
* A setup_fresh_app decorator which should make writing tests a bit easier.Christopher Allan Webber2011-06-061-0/+16
| | | | Setting test_register_views() to use it also.
* Actually it's a lot better of an idea to load the full application outChristopher Allan Webber2011-06-051-4/+3
| | | | | | | | | of the paste config file the way paste would than to load components of it ourselves. Aside from this being nicer, it's also necessary for the sake of getting the middleware working nicely. We could do it ourselves, but why bother when paste can just do it for us?
* Proper webtest infrastructure... seems to be about right anyway :)Christopher Allan Webber2011-06-041-0/+94