aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_edit.py
Commit message (Collapse)AuthorAgeFilesLines
* Apply pyupgrade --py36-plus.Ben Sturmfels2021-09-231-1/+1
| | | | This removes some 'u' prefixes and converts simple format() calls to f-strings.
* More robust test fix.Ben Sturmfels2021-03-061-2/+2
|
* Fix broken metadata editing test.Ben Sturmfels2021-03-061-1/+1
|
* Remove remaining imports/calls to six not automatically removed by pyupgrade.Ben Sturmfels2021-03-051-3/+1
|
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-25/+25
|
* Fix dependencies and tests for clean Python 2 & 3 test runs under Docker.Ben Sturmfels2020-04-281-6/+3
| | | | | This change gives a clean test run in the Debian-based Python 2 and Python 3 docker images.
* Fix some unit tests and bugsJessica Tallon2015-08-241-6/+6
| | | | | | | | | | | | | | | | | | This fixes a lot of the issues with the LocalUser changes that were merged recently. There was a problem where the attributes of LocalUser were not being eagerly loaded and because the Session was detached an exception was being raised when they were accessed. This also fixes some typo's which were introduced. Finally this adds a temporary fix for a potential SQLAlchemy bug, this is a bug where doing: User.query.filter(LocalUser.username == "some_username").first() does NOT yeild a user with the username "some_username" but all users on the site. The temp fix is to just query the LocalUser, this should be resolved when bug is confirmed and fixed upstream.
* Change codebase to query or create correct User modelJessica Tallon2015-07-311-10/+13
| | | | | | | The code base had many references to User.username and other specific to LocalUser attributes as that was the way it use to exist. This updates those to query on the generic User model but filtering by attributes on the LocalUser.
* Last two issues related to the python 3 merge tests: fixed!Christopher Allan Webber2014-09-161-2/+7
| | | | | | | - Fix the "pulling the error out of excinfo" stuff for py3 - The u"" only gets embedded in the string on py2. This commit sponsored by Jeff Gibson. Thanks, Jeff! :)
* Much more nicely formed form error checkChristopher Allan Webber2014-09-161-2/+4
| | | | | | This doesn't rely on checking HTML output... thus, cleaner. This commit sponsored by Alexandre Guédon. Thank you!
* Fix error check in test_edit.py for python 3Christopher Allan Webber2014-09-161-1/+1
| | | | | This isn't the nicest of checks... we should probably be checking the actual form passed into the context. But for now, it's a fix.
* Merge branch 'master' into merge-python3-portChristopher Allan Webber2014-09-161-2/+81
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Has some issues, will iteratively fix! Conflicts: mediagoblin/gmg_commands/__init__.py mediagoblin/gmg_commands/deletemedia.py mediagoblin/gmg_commands/users.py mediagoblin/oauth/views.py mediagoblin/plugins/api/views.py mediagoblin/tests/test_api.py mediagoblin/tests/test_edit.py mediagoblin/tests/test_oauth1.py mediagoblin/tests/test_util.py mediagoblin/tools/mail.py mediagoblin/webfinger/views.py setup.py
| * Added some tests for metadata.tilly-Q2014-05-141-3/+81
| |
* | Fix another tests.Berker Peksag2014-08-071-2/+1
| | | | | | | | (forgot to commit earlier)
* | Fix tests on Python 3.Berker Peksag2014-07-141-1/+1
|/
* Merge remote-tracking branch 'refs/remotes/tilly-q/OPW-Moderation-Update'Christopher Allan Webber2013-10-071-3/+6
|\ | | | | | | | | | | | | Conflicts: mediagoblin/templates/mediagoblin/user_pages/user.html mediagoblin/tests/test_auth.py mediagoblin/tests/test_submission.py
| * Merge branch 'master' into OPW-Moderation-Updatetilly-Q2013-09-121-4/+4
| |\ | | | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py
| * | This commit was just to fix a few of the errors with the merging and totilly-Q2013-08-201-3/+6
| | | | | | | | | | | | make sure that all of the previous tests work fine.
* | | Merge remote-tracking branch 'refs/remotes/rodney757/auth_refactor'Christopher Allan Webber2013-09-191-35/+0
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Conflicts: mediagoblin/auth/views.py mediagoblin/edit/forms.py mediagoblin/templates/mediagoblin/edit/edit_account.html
| * | moved change_pass to basic_auth and fixed some typos with the moving of ↵Rodney Ewing2013-08-161-35/+0
| |/ | | | | | | forgot pass
* / fix tests to use new change_email viewRodney Ewing2013-08-201-4/+4
|/
* Patch by Strum. Ticket #451 - Convert all mongokit style .find, .find_one, ↵Rodney Ewing2013-07-111-2/+2
| | | | .one calls over to SQLAlchemy queries
* Merge remote-tracking branch 'upstream/master' into authRodney Ewing2013-06-251-2/+65
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * Removing the "enter your password to change your email" bit.Christopher Allan Webber2013-06-211-38/+0
| | | | | | | | | | | | | | A good idea, though it feels fairly clumsy in the form, and I think if you're logged in you can already sabotage the user pretty well. This commit sponsored by Sergey Matveev. Thanks!
| * added error handling on bad token, fixed route, and added testsRodney Ewing2013-05-241-2/+104
| |
* | added gen_password_hash and check_password functions to auth/__init__Rodney Ewing2013-05-241-3/+3
| |
* | modified test .ini files and changed tests to use basic_auth bcryptRodney Ewing2013-05-241-1/+2
|/
* modified change_pass testsRodney Ewing2013-05-201-7/+10
|
* 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...
* Really removing nosetests things now! all assert_whatever removedChristopher Allan Webber2013-04-061-9/+12
|
* Switch test_app generation over to use py.test fixtures.Christopher Allan Webber2013-04-041-17/+20
| | | | | | | | | | | | By doing this, we can take advantage of py.test's ability to create temporary directories that are then cleaned up later during testing. This helps for sandboxing things. This also involves a ton of changes: - Changing the get_app stuff appropriately, getting rid of the setup_fresh_app decorator - Making said fixture - Switching over a billion tests to use it
* All mediagoblin tests now pass with py.test (switched setUp to setup)Christopher Allan Webber2013-04-031-1/+1
|
* Rename get_test_app to get_app.Elrond2013-01-181-2/+2
| | | | | | | nosetests runs everything that even vaguely looks like a test case... even our get_test_app. And as it is imported everywhere... it is run everywhere as a test case. Renaming it saves us about 10+ tests and a few seconds of time.
* Introduce user_deletion test.Sebastian Spaeth2013-01-171-0/+18
| | | | | | | | Delete a user via web interface and see if it works. TODO: this does not test that related entries are also cleaned up and we should extend the test to do so. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Improve and extend profile editing testsSebastian Spaeth2013-01-091-76/+97
| | | | | | | | | | | | | | | | | | We only ever ran the password changing test here, and not the half-existing test for changing the bio and homepage. Fix the tests to actually run both tests. We check that setting bio and homepage to a valid value works as expected. We also test for invalid bio (too long) and invalid URLs setting fails. (which is what we want). - Check that the old /edit/profile/ address redirects to /u/USER/edit/. - Check that /u/USER/edit/ works as expected - Check that /u/OTHERUSER/edit/ fails with a 403 Forbidden error when we are not logged in as that user. The last remaining test that would be useful is to make a user an admin and make sure the admin can edit other users' profiles. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Prevent SQLAlchemy non-Unicode warnings in this test.Brett Smith2012-07-081-4/+4
|
* These are changes for issue #405, add email comment notification.Derek Moore2012-03-151-0/+1
|
* It's 2012 all up in hereChristopher Allan Webber2012-02-021-1/+1
|
* Fix Unit Tests for new password changingElrond2012-01-051-8/+4
|
* Dot-Notation: tests/test_edit.pyElrond2011-12-051-4/+4
| | | | | convert tests/test_edit.py over to Dot-Notation. It only accesses the User object.
* fixture_add_user: Factoring a unit test toolElrond2011-12-011-17/+4
| | | | | | | 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.
* added unittests, now using form errors and fixed bug when no GET parameter ↵Jakob Kramer2011-11-201-0/+112
is given for /edit/profile/