aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | I've moved on to one of the last phases of my work! Now I'm just checking offtilly-Q2013-09-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | items from my last to-do list. The biggest change in this commit is that I made the moderation reports panel sortable via get request. I also added in page nu- mbers so that more than 10 reports can be viewed. I'm hoping to go from here to make a search page. Aside from that, there were only a few other changes I made this time. I fixed two bugs in my code. I copy-ed and pasted function mediagoblin.user_pages.views:media_preview_comment which I must've deleted ear- -lier in a merge. And I moved some of the javascript I was using in the modera- -tion templates into it's own seperate .js file. =============================================================================== Made the moderation reports panel view sortable =============================================================================== --\ mediagoblin/moderation/forms.py --\ mediagoblin/moderation/views.py --\ mediagoblin/templates/mediagoblin/moderation/report_panel.html --\ mediagoblin/templates/mediagoblin/moderation/user.html --| Made `<user> report history` into a link that automatically shows all open | and closed reports on <user>. =============================================================================== Grabbed some code from master that I accidentally deleted in a merge =============================================================================== --\ mediagoblin/user_pages/views.py =============================================================================== Moved javascript away from templates into its own file =============================================================================== --\ mediagoblin/static/js/setup_report_forms.js --\ mediagoblin/templates/mediagoblin/moderation/report.html --\ mediagoblin/templates/mediagoblin/moderation/user.html =============================================================================== Cleared trailing white space =============================================================================== --\ mediagoblin/templates/mediagoblin/moderation/media_panel.html --\ mediagoblin/moderation/tools.py --\ mediagoblin/templates/mediagoblin/meta/terms_of_service.html --\ mediagoblin/templates/mediagoblin/moderation/report_panel.html --\ mediagoblin/templates/mediagoblin/user_pages/media.html --\ mediagoblin/tests/test_modelmethods.py =============================================================================== Small fixes =============================================================================== --\ mediagoblin/templates/mediagoblin/moderation/report.html --| Fixed a link so that it points to the correct user page --\ mediagoblin/templates/mediagoblin/user_pages/media.html --| Fixed a bug that crashed this page when a guest visitted it (because | request.user is None)
| * | This is a quick commit. I gave admins the ability to ban or unban userstilly-Q2013-08-291-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | straight from the moderation.users_detail page. I also changed the UserBan.expiration_date type from DateTime into Date. I also began work on the Terms of Service, pulled from another website (which will be cited clearly before I'm done). I added new tests as well for the ban/unbanning. Lastly, I added a few `user_not_banned` decorators to relevant views, so banned users cannot access any pages.
| * | This was a big commit! I included lots of documentation below, but generally Itilly-Q2013-08-297-12/+625
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | did a few things. I wrote many many many new tests, either in old test files or in the three new test files I made. I also did some code-keeping work, deleting trailing whitespace and deleting vestigial code. Lastly, I fixed the parts of the code which I realized were broken thru the process of running tests. =============================================================================== Deleted trailing whitespace: =============================================================================== --\ mediagoblin/decorators.py --\ mediagoblin/auth/tools.py --\ mediagoblin/db/migrations.py --\ mediagoblin/db/models.py --\ mediagoblin/gmg_commands/users.py --\ mediagoblin/moderation/forms.py --\ mediagoblin/moderation/tools.py --\ mediagoblin/moderation/views.py --\ mediagoblin/templates/mediagoblin/moderation/media_panel.html --\ mediagoblin/templates/mediagoblin/moderation/report.html --\ mediagoblin/templates/mediagoblin/moderation/report_panel.html --\ mediagoblin/templates/mediagoblin/moderation/user.html --\ mediagoblin/templates/mediagoblin/moderation/user_panel.html --\ mediagoblin/templates/mediagoblin/user_pages/report.html --\ mediagoblin/templates/mediagoblin/utils/report.html --\ mediagoblin/user_pages/lib.py --\ mediagoblin/user_pages/views.py =============================================================================== Deleted Vestigial Code =============================================================================== --\ mediagoblin/db/util.py --\ mediagoblin/tests/test_notifications.py =============================================================================== Modified the Code: =============================================================================== --\ mediagoblin/moderation/tools.py --| Encapsulated the code around giving/taking away privileges into two | funtions. --\ mediagoblin/moderation/views.py --| Imported and used the give/take away privilege functions --| Replaced 'require_admin_or_moderator_login' with |'user_has_privilege(u"admin")' for adding/taking away privileges, only | admins are allowed to do this. --\ mediagoblin/templates/mediagoblin/banned.html --| Added relevant translation tags --| Added ability to display indefinite banning --\ mediagoblin/templates/mediagoblin/user_pages/media.html --| Made sure the add comments button was only visible for users with the | `commenter` privilege --\ mediagoblin/tests/test_submission.py --| Paroneayea fixed a DetachedInstanceError I was having with the our_user | function --\ mediagoblin/tests/tools.py --| Added a fixture_add_comment_report function for testing. --\ mediagoblin/tools/response.py --| Fixed a minor error where a necessary return statement was missing --| Fit the code within 80 columns --\ mediagoblin/user_pages/views.py --| Added a necessary decorator to ensure that only users with the 'commenter' | privilege can post comments =============================================================================== Wrote new tests for an old test file: =============================================================================== --\ mediagoblin/tests/test_auth.py --| Added a new test to make sure privilege granting on registration happens | correctly --\ mediagoblin/tests/test_modelmethods.py* --| Added a test to ensure the User method has_privilege works properly =============================================================================== Wrote entirely new files full of tests: =============================================================================== --\ mediagoblin/tests/test_moderation.py --\ mediagoblin/tests/test_privileges.py --\ mediagoblin/tests/test_reporting.py =============================================================================== =============================================================================== NOTE: Any files I've marked with a * in this commit report, were actually subm- itted in my last commit. I made that committ to fix an error I was having, so they weren't properly documented in that report. =============================================================================== ===============================================================================
| * | pushing so paroneayea can help me resolve a conflict within the tests.tilly-Q2013-08-232-18/+16
| | |
| * | This commit was just to fix a few of the errors with the merging and totilly-Q2013-08-205-7/+15
| | | | | | | | | | | | make sure that all of the previous tests work fine.
| * | Merge branch 'master' into OPW-Moderation-Updatetilly-Q2013-08-207-10/+430
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mediagoblin/db/models.py mediagoblin/decorators.py mediagoblin/routing.py mediagoblin/user_pages/views.py
| * | | This was a very small update, I'm hoping to rebase after this to solve sometilly-Q2013-08-206-34/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | other problems. I started looking at the tests in this update. This update I spent fixing the tests to work with my new code. --\ mediagoblin/db/migration_tools.py --| Merging from ticket 679 --\ mediagoblin/db/migrations.py --| Added unique constraint to Privilege.privilege_name --\ mediagoblin/db/models.py --| Deleted vestigial Privilege.is_admin_or_moderator method --\ mediagoblin/templates/mediagoblin/moderation/user.html --| Add a `Ban User` / `UnBan User` for admin --\ mediagoblin/test/test_api.py --| Fixed test with my new changes --\ mediagoblin/test/test_auth.py --| Try to fix test, still having problems --\ mediagoblin/test/test_modelmethods.py --| Wrote my first test for the User.has_privilege method --\ mediagoblin/test/test_modelmethods.py --| Fixed test with my new changes --\ mediagoblin/test/test_sqlmigrations.py --| Merging from ticket 679 --\ mediagoblin/test/tools.py --| Editted add_fixture_user to allow for privileges rather than active column
* | | | Fixing ALL THE BROKEN TESTS. I probably broke most of them.Christopher Allan Webber2013-09-294-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We've now broken out user.html and user_nonactive.html but the tests didn't reflect it - the location of one of the module imports broke, but I didn't notice because of .pyc files ;) This commit sponsored by Tiberiu C. Turbureanu (ceata.org). Thank you!
* | | | Fixing one test post-merge. We got rid of the mongo stuff, so... consistency!Christopher Allan Webber2013-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we can merge LDAP support! Woohoo! This commit sponsored by the ever-awesome GMG contributor, Sebastian Spaeth. Thanks!
* | | | Merge remote-tracking branch 'refs/remotes/rodney757/new_ldap'Christopher Allan Webber2013-09-202-0/+166
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: docs/source/index.rst mediagoblin/templates/mediagoblin/auth/login.html
| * | | | skip test if python-ldap is not installedRodney Ewing2013-08-151-0/+2
| | | | |
| * | | | added tests for ldap pluginRodney Ewing2013-08-152-0/+164
| | | | |
* | | | | Merge remote-tracking branch 'refs/remotes/rodney757/auth_refactor'Christopher Allan Webber2013-09-196-41/+50
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mediagoblin/auth/views.py mediagoblin/edit/forms.py mediagoblin/templates/mediagoblin/edit/edit_account.html
| * | | | | skip openid test if python-openid isn't installedRodney Ewing2013-08-161-0/+1
| | | | | |
| * | | | | use new in-memory db for testingRodney Ewing2013-08-162-4/+4
| | | | | |
| * | | | | fixed some typos and missed importsRodney Ewing2013-08-161-1/+1
| | | | | |
| * | | | | moved change_pass to basic_auth and fixed some typos with the moving of ↵Rodney Ewing2013-08-163-37/+45
| | | | | | | | | | | | | | | | | | | | | | | | forgot pass
* | | | | | Merge remote-tracking branch 'refs/remotes/rodney757/file_limits'Christopher Allan Webber2013-09-186-2/+121
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py
| * | | | | duplicateRodney Ewing2013-08-261-1/+0
| | | | | |
| * | | | | copying.txtRodney Ewing2013-08-261-0/+5
| | | | | |
| * | | | | added testsRodney Ewing2013-08-263-8/+12
| | | | | |
| * | | | | fixed tests and defaultsRodney Ewing2013-08-261-0/+8
| | | | | |
| * | | | | fixed testsRodney Ewing2013-08-262-8/+0
| | | | | |
| * | | | | fixed tests and defaultsRodney Ewing2013-08-261-0/+8
| | | | | |
| * | | | | fixed tests and defaultsRodney Ewing2013-08-264-6/+43
| | | | | |
| * | | | | added testsRodney Ewing2013-08-261-1/+67
| | |_|_|/ | |/| | |
* | | | | Merge remote-tracking branch 'refs/remotes/rodney757/email'Christopher Allan Webber2013-08-251-4/+4
|\ \ \ \ \
| * | | | | fix tests to use new change_email viewRodney Ewing2013-08-201-4/+4
| |/ / / /
* / / / / added test for mark all comment notifications seenRodney Ewing2013-08-201-0/+53
|/ / / /
* | | | Switch deprecated BROKER_HOST to new BROKER_URLSebastian Spaeth2013-08-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | People will need to switch that setting in their mediagoblin.ini too. Make sure we RELEASE NOTE this. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | | -skip persona test is requests is not installedRodney Ewing2013-08-191-0/+2
|/ / / | | | | | | | | | - should use request.urlgen for location
* / / fix persona tests by using a correct queryRodney Ewing2013-08-151-4/+4
|/ /
* | Merge branch 'persona_resquash'Christopher Allan Webber2013-08-152-0/+252
|\ \
| * | merge --squash persona branch to take care of a false merge commit inRodney Ewing2013-07-032-0/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the basic_auth branch that persona is forked from Conflicts: mediagoblin/templates/mediagoblin/auth/login.html mediagoblin/templates/mediagoblin/auth/register.html mediagoblin/templates/mediagoblin/edit/edit_account.html These are commit messages from the squashed persona stuff: - added tests and fixed minor errors - fixed a redirect loop when only persona is enabled and accessing /auth/login - moved persona.js to plugin's static dir - fixes for add/remove persona emails - add and remove personas - working with multiple plugins - working version - switched to hidden form instead of ajax - beginings
* | | Merge remote-tracking branch 'refs/remotes/tsyesika/master'Christopher Allan Webber2013-08-153-8/+174
|\ \ \ | | | | | | | | | | | | New oauth tools! Heck yeah!
| * | | Adds test for request_tokensxray72242013-07-181-7/+51
| | | |
| * | | Adds some tests for the OAuth and some docsxray72242013-07-161-0/+122
| | | |
| * | | Fixes testsxray72242013-07-142-8/+8
| | |/ | |/|
* | | I added a few more unitests in this commit. It now confirms that even after mi-tilly-Q2013-07-311-1/+11
| | | | | | | | | | | | -gration, there is only one of each Foundation object.
* | | In this commit I added a few unittests to account for Foundations. There weretilly-Q2013-07-311-6/+21
| | | | | | | | | | | | | | | only a few tests I had to add to mediagoblin/tests/test_sql_migrations.py beca- -use the foundation creation only happens at database initialization.
* | | Starting to write unit tests...tilly-Q2013-07-301-5/+8
|/ /
* | Skip the openid tests if the openid module is not installed.Christopher Allan Webber2013-07-141-3/+4
| | | | | | | | This commit sponsored by Brandon Smith. Thank you!
* | Merge branch 'rodney757-media_plugins'Christopher Allan Webber2013-07-122-4/+4
|\ \ | | | | | | | | | | | | | | | Conflicts: mediagoblin.ini mediagoblin/tests/test_mgoblin_app.ini
| * | Switch the import of the image media manager over to the new classChristopher Allan Webber2013-07-121-2/+2
| | | | | | | | | | | | | | | | | | | | | This helps resolve one of the remaining issues with the tests for the media type pluginification. This commit sponsored by Jeffrey Moe. Thanks Jeff! Lulzbot rocks!
| * | fixed some typos and enabled media_type plugins in testsRodney Ewing2013-07-021-2/+2
| | |
* | | Patch by Strum. Ticket #451 - Convert all mongokit style .find, .find_one, ↵Rodney Ewing2013-07-115-20/+20
| |/ |/| | | | | .one calls over to SQLAlchemy queries
* | Merge remote-tracking branch 'remotes/lotusecho/trac_711_test_speed'Christopher Allan Webber2013-07-033-6/+9
|\ \
| * | Improved test runtime from 352 seconds to 59 seconds by implementing an ↵Emily O'Leary2013-06-253-6/+9
| | | | | | | | | | | | in-memory sqlite DB and including an option to run migrations on this newly created database by adding a config option called run_migrations to the config_spec and passing it along in app.py to the setup_database function.
* | | merge --squash openid branch to take care of a false merge commit in theRodney Ewing2013-07-034-1/+415
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | basic_auth branch that openid is forked from Commits squashed together (in reverse chronological order): - do the label thing only for boolean fields - made edit_account to autofocus on the first field - added feature to render_divs where if field.label == '' then it will render form.description the same a render_label - added allow_registration check - refactored create_user - removed verification_key from create_user - removed get_user from openid - cleanup after removing openid from template_env.globals - fix for werkzueg 0.9.1 - cleanup after merge - more tests - restored openid extra_validation just for safety - tests for openid - deleted openid extra_validation - passed next parameter in session for openid - fixed a bug that was deleting the messages - implemented openid store using sqlalchemy - ask openid provider for 'nickname' to prefill username in registration form - refactored delete openid url to work with generic urls such as google and to not allow a user to delete a url if it is there only one and they don't have a pw - refactored login to register user workflow, which fixed a problem where the 'or register with a password link' wasn't showing up when the finish_login view called the register view because there wasn't any redirect. - added the ability to remove openid's - added the ability to add openids to an existing account - refactored start_login and finish_login views - modified edit_account.html to use render_divs - modified gmg/edit/views to behave appropriatly if no password authentication is enabled. moved the update email stuff to it's own funtion to make edit_account view cleaner. edit_account now modifies the form depending on the plugins. - minor typos - added retrieving email from openid provider - moved allow_registration check to a decorator - moved check if auth is enabled to a decorator - changed openid user registration to go through login first - cleanup after merge - modified verification emails to use itsdangerous tokens - added error handling on bad token, fixed route, and added tests - added support for user to change email address - added link to login view openid/password in login template - updated openid get_user function - modified get_user function to take kwargs instead of username - no need for user might be email kwarg in check_login_simple - added gen_password_hash and check_password functions to auth/__init__ - added focus to form input - made imports fully qualified - modified basic_auth.check_login to check that the user has a pw_hash first - changed occurances of form.data['whatever'] to form.whatever.data - convert tabs to spaces in register template, remove unsed templates, and fixed trans tags in templates - in process of openid login. it works, but needs major imporvements - make password field required in basic_auth form - check if password field present in basic_auth create_user - modified openid create_user function - modified models based on Elronds suggestions - changed register form action to a variable to be passed in by the view using the template - openid plugin v0, still need to authenticate via openid. - added a register_user function to be able to use in a plugin's register view, and modified auth/views.register to redirect to openid/register if appropriate. - Modified basic_auth plugin to work with modified auth plugin hooks. Added context variables. Removed basic_auth/tools which was previously renamed to basic_auth/lib. - modified auth/__init__ hooks to work better with multiple plugins. Removed auth/lib.py. And added a basic_extra_verification function that all plugins will use. - added models and migrations for openid plugin
* | Merge remote-tracking branch 'upstream/master' into authRodney Ewing2013-06-256-46/+321
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: mediagoblin/app.py mediagoblin/auth/forms.py mediagoblin/auth/tools.py mediagoblin/db/migrations.py mediagoblin/db/models.py mediagoblin/edit/views.py mediagoblin/plugins/basic_auth/tools.py mediagoblin/tests/test_edit.py