aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_pluginapi.py
Commit message (Collapse)AuthorAgeFilesLines
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-5/+5
|
* Fix another tests.Berker Peksag2014-08-071-2/+1
| | | | (forgot to commit earlier)
* Fix tests on Python 3.Berker Peksag2014-07-141-3/+3
|
* The file() builtin has been removed in Python 3. Use open() instead.Berker Peksag2014-06-071-3/+3
|
* Full unit test for the plugin assetlink command.Christopher Allan Webber2013-05-231-1/+73
| | | | | | | | | | Tests: - if the link doesn't exist yet - if the link already exists - if it is a symlink to something else - if it exists but is not a symlink This commit sponsored by Lon Koenig. Thank you!
* test_plugin_staticdirect now works and passes.Christopher Allan Webber2013-05-231-0/+34
| | | | This commit sponsored by Samuel Vale. Thank you!
* Reverting "Always activate testing in every test module ever."Christopher Allan Webber2013-05-171-3/+0
| | | | | | Revert "Always activate testing in every test module ever." This reverts commit 0536306048daa0970d2e43411ba2a9bf073e570e.
* Always activate testing in every test module ever.Christopher Allan Webber2013-05-161-0/+3
| | | | Kind of a dorky way to implement this, but...
* Testing the template_context_prerender hookChristopher Allan Webber2013-05-151-2/+4
| | | | | | | | | | | This allows for modifying any context *right before render*, including access to the variables that are passed in. This test takes advantage of that and takes one of the variables, "doubleme", and modifies it (doubles it!) In our case it turns "happy" and "joy" into "happyhappy" and "joyjoy". This commit sponsored by Mark Holmquist. Thank you!
* Documenting the test_modify_context and context_modified_app methodsChristopher Allan Webber2013-05-141-0/+7
|
* Fully working context hooks, both template/view and global level, with testsChristopher Allan Webber2013-05-141-2/+16
| | | | | | Needs documentation though... that's coming next :) This commit sponsored by Luca Tius. Thanks Luca!
* The beginning of context hooks.Christopher Allan Webber2013-05-081-0/+12
| | | | | | | | | | | | | | | | | Not the working solution, but getting there conceptually. Basically we'll have a key with the view and the template as a tuple which is the context hook that anyone can attach to. However, some changes have still to be made: - The unit test doesn't work yet and contains a set_trace ;) - We'll probably switch the "view" component from being the callable to the "urlgen"'able name per Elrond's suggestion - Found a bug in unit tests related to running custom apps for different configs... hm. I need to fix this! Nonetheless, making progress. This commit sponsored by... wait a minute... Christopher Webber?!
* Unit tests for plugins defining their own config_spec.ini!Christopher Allan Webber2013-05-081-0/+29
| | | | This commit sponsored by David Ahmed. Thank you!
* Refactor test configs.Elrond2013-04-201-24/+13
| | | | All the hook_* tests use the same config, so refactor it.
* Added new tests to test hook_transform()Christopher Allan Webber2013-04-191-0/+21
|
* Adjusting tests to use hook_handle and hook_runallChristopher Allan Webber2013-04-191-16/+17
|
* callable hook convenience functions.. now work, and with tests!Christopher Allan Webber2013-04-101-3/+3
| | | | | | | | - Added three "callables" test plugins. - updated callable_runone to check for unhandled_okay in the kwargs dict. All passing!
* tests for new pluginapi methods that can't possibly pass yet :)Christopher Allan Webber2013-04-091-0/+111
|
* Really removing nosetests things now! all assert_whatever removedChristopher Allan Webber2013-04-061-11/+10
|
* [Issue 466] Implement e-z plugin disablingWill Kahn-Greene2012-07-171-0/+20
|
* Rework plugin infrastructure to nix side-effectsWill Kahn-Greene2012-07-171-30/+27
| | | | | | | | | | | | | This reworks the plugin infrastructure so as to remove module-loading side-effects which were making things a pain in the ass to test. With the new system, there's no auto-registering meta class. Instead plugins do whatever they want and then specify a hooks dict that maps hook names to callables for the things they're tying into. The most common one (and the only one we've implemented so far) is "setup". This also simplifies the sampleplugin a little by moving the code to __init__.py.
* 401. Plugin infrastructureWill Kahn-Greene2012-05-131-0/+158
* implements installing, loading and setup for plugins * codifies configuration * has a sample plugin * docs * tests