64 Commits

Author SHA1 Message Date
Will Kahn-Greene
12a100e4d8 508. Updates copyright/license information 2011-09-01 20:50:19 -04:00
Christopher Allan Webber
0419d0da24 get_test_app() should turn on testing buckets 2011-08-01 09:11:14 -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
Elrond
421129b6bb Move config.py to init/
Some simple changes needed to do that.

The interesting question left:
Should config_spec.ini also be moved?
2011-07-02 22:40:19 +02:00
Elrond
073b61fe53 Move mediagoblin.celery_setup -> mediagoblin.init.celery
As the first target of the new .init. submodule move
celery_setup there. Quite straight forward, just a lot of
places to change.
2011-07-02 20:50:23 +02:00
Christopher Allan Webber
9ea5c28b7a Celery wasn't really being properly connected during tests.
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.
2011-06-26 14:45:19 -05:00
Christopher Allan Webber
29f1333e72 Extra checks so that we don't even RUN tests unless the right celery environ set 2011-06-21 17:02:49 -05:00
Christopher Allan Webber
cfd2cbf3dd Make sure we *ONLY* ever kill the test database, EVER. 2011-06-21 16:04:44 -05:00
Christopher Allan Webber
5c441e75eb Also moving the test_server.ini to test_paste.ini to avoid ambiguity. 2011-06-20 08:57:58 -05:00
Christopher Allan Webber
eaca78748c Need to run nosetests with CELERY_CONFIG_MODULE set to from_tests again.
Basically, if we don't do this celery sets itself up before it should
and improperly. :\
2011-06-19 16:43:23 -05:00
Christopher Allan Webber
623bee73b1 Nosetests should now be able to run using the new configobj / app init setup
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.
2011-06-18 20:14:33 -05:00
Christopher Allan Webber
3aa4c668b9 A setup_fresh_app decorator which should make writing tests a bit easier.
Setting test_register_views() to use it also.
2011-06-06 07:45:18 -05:00
Christopher Allan Webber
0a791a94de Actually it's a lot better of an idea to load the full application out
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?
2011-06-05 10:33:59 -05:00
Christopher Allan Webber
c5678c1ab3 Proper webtest infrastructure... seems to be about right anyway :) 2011-06-04 13:20:48 -05:00