Christopher Allan Webber
86e3e90080
Merge remote branch 'remotes/gullydwarf-cfdv/f368_msg_framework'
2011-06-28 20:09:35 -05:00
Caleb Forbes Davis V
9f094beaaf
adds message queue unit testing
2011-06-28 02:35:44 -05: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
Chris Moylan
0a78be3e08
removed the @setup_fresh_app decorator because it was messing \
...
with my fixtures.
2011-06-23 23:02:36 -05:00
Chris Moylan
dcebe4b032
Merge branch 'master' into test_submission_views_365
2011-06-22 21:40:17 -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
Chris Moylan
1975b5dd1f
began work on submission test. nothing to see here
2011-06-21 00:11:54 -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
0798684894
Merge remote branch 'remotes/cmoylan/test_auth_views_364'
2011-06-19 19:56:25 -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
d802498a2c
Merge remote branch 'remotes/elrond/idea/globals_check'
...
Conflicts:
mediagoblin/tests/test_globals.py
2011-06-19 16:22:41 -05:00
Christopher Allan Webber
668e8c26ad
Reset the globals parameters while testing parameters
...
(This way we can be sure that the database is torn down if necessary
but this was the only test that passed last.)
2011-06-19 16:03:13 -05:00
Christopher Allan Webber
78e1c5f1ed
Actually we need pkg_resources again in test_celery_setup :)
...
This got removed in master at the same time that it got used in the
configobj branch...
2011-06-19 13:00:49 -05:00
Christopher Allan Webber
fa4e6b279b
Merge branch 'configobj'
2011-06-19 12:59:19 -05:00
Chris Moylan
12c231c8ac
added test coverage for redirecting after login with the next param
2011-06-19 12:28:53 -05:00
Christopher Allan Webber
3c7d11ff28
renaming storage_system_from_paste_config()->storage_system_from_config()
...
As Elrond points out, this name doesn't make sense anymore since this
isn't based on the paste config. Thanks Elrond!
2011-06-19 11:36:52 -05:00
Chris Moylan
0a4cecdc66
Added tests for all sorts of login form abuse.
...
Added tests for log out
2011-06-19 00:22:47 -05:00
Christopher Allan Webber
8abeaf2fb6
Preparing celery unit tests for new setup.
...
Instead of the previous passing in of dictionaries, we're actually
checking some example config files.
2011-06-18 20:15:46 -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
908d045939
Only kill the database if it's really set up.
2011-06-18 20:02:59 -05:00
Christopher Allan Webber
d5234024b0
Tests for mediagoblin.config functions
...
Tests for:
- read_mediagoblin_config()
- generate_validation_report()
2011-06-18 16:52:40 -05:00
Christopher Allan Webber
f2f3fe33e9
Removing unused pkg_resources import from test_celery_setup
2011-06-18 15:29:16 -05:00
Chris Moylan
757690cc2e
logins are now somewhat tested
2011-06-17 00:15:24 -05:00
Christopher Allan Webber
0e9dd2a286
Merge remote branch 'remotes/elrond/dev/workbench_class'
2011-06-14 17:17:03 -05:00
Elrond
b67a983a02
Move destroy_workbench to Workbench class
...
And add a lot of warnings, as the checks for "being part of
the main Manager" are all gone.
2011-06-14 20:39:14 +02:00
Elrond
8bfa533f8b
Drop WorkbenchManager.localized_file()
...
As Workbench has the localized_file() method, use this
everywhere and drop the wrapper method from
WorkbenchManager.
The processing code already did that.
2011-06-14 20:01:39 +02:00
Christopher Allan Webber
a68ee5556e
A super strict HTML cleaner method with mediocre tests.
2011-06-13 21:01:19 -05:00
Elrond
52426ae01f
Create a Workbench class and use it everywhere.
...
Some references to Workbench.dir look ugly, I'm happy to
hear suggestions there.
2011-06-13 00:39:41 +02:00
Christopher Allan Webber
6e7ce8d1af
mediagoblin.globals->mediagoblin.mg_globals
2011-06-12 17:27:37 -05:00
Elrond
49285baf27
Let setup_globals check for known globals
...
To avoid typos in calling setup_globals(), only allow
globals, which are already known to the system.
Plugins should have their own globals.
2011-06-12 17:43:54 +02:00
Christopher Allan Webber
2f968422e9
Merge remote branch 'remotes/elrond/idea/tests_kill_db'
2011-06-12 09:11:39 -05:00
Christopher Allan Webber
68ffb13690
possibly_localize_file->localized_file... a bit less terribly long.
2011-06-11 21:23:32 -05:00
Christopher Allan Webber
fdc5003903
Don't bother returning whether or not we copied it or not, we can
...
figure that out by looking to see whether our storage is local or not.
2011-06-11 21:20:26 -05:00
Christopher Allan Webber
a32acafa0b
Moving workbench out of process_media
2011-06-11 20:33:41 -05:00
Christopher Allan Webber
f43ecb0fc4
test WorkbenchManager.possibly_localize_file()
2011-06-11 19:18:51 -05:00
Christopher Allan Webber
d91b5a7c2d
Added a FakeRemoteStorage, for testing purposes
2011-06-11 19:17:44 -05:00
Christopher Allan Webber
2ecee34f08
Make sure workbench won't kill directories out of scope.
2011-06-11 18:52:48 -05:00
Christopher Allan Webber
2616d70903
Tests for creating/destroying workbenches
2011-06-11 18:49:04 -05:00
Christopher Allan Webber
6a07362dd0
Adding a copy_locally() method to the StorageInterface and giving it a test.
2011-06-11 12:04:30 -05:00
Christopher Allan Webber
3a89c23e7f
Allow storage systems to be local and allow for a get_local_path
...
method if applicable.
2011-06-11 11:18:03 -05:00
Elrond
12c559447a
Tests: Kill the whole testing database after all tests
...
nose allows setup and teardown functions at the package
level. So use this to drop the complete database after all
tests have finished.
2011-06-10 21:59:04 +02: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
2fecc29d06
Docstring for test_register_views()
2011-06-05 18:16:31 -05:00
Christopher Allan Webber
8a869db8e4
Make sure that two users with the same username can't register.
2011-06-05 18:14:48 -05:00
Christopher Allan Webber
7b1e17ed0d
Email verification view test works
2011-06-05 17:49:43 -05:00
Christopher Allan Webber
1972a888b3
Make sure we can register, and then that we get the verification email
2011-06-05 17:39:47 -05:00
Christopher Allan Webber
8045fd4074
Make sure that get_test_app() really does wipe the database
2011-06-05 16:43:25 -05:00
Christopher Allan Webber
cb9bac0c83
Just a bit of formatting for these unfinished tests ;)
2011-06-05 15:33:48 -05:00
Christopher Allan Webber
651403f025
Test registration form integrity
2011-06-05 15:30:07 -05:00