| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This removes some 'u' prefixes and converts simple format() calls to f-strings.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This change gives a clean test run in the Debian-based Python 2 and Python 3
docker images.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
- 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! :)
|
|
|
|
|
|
| |
This doesn't rely on checking HTML output... thus, cleaner.
This commit sponsored by Alexandre Guédon. Thank you!
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| | |
(forgot to commit earlier)
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
mediagoblin/templates/mediagoblin/user_pages/user.html
mediagoblin/tests/test_auth.py
mediagoblin/tests/test_submission.py
|
| |\
| | |
| | |
| | |
| | | |
Conflicts:
mediagoblin/db/migrations.py
|
| | |
| | |
| | |
| | | |
make sure that all of the previous tests work fine.
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | | |
Conflicts:
mediagoblin/auth/views.py
mediagoblin/edit/forms.py
mediagoblin/templates/mediagoblin/edit/edit_account.html
|
| |/
| |
| |
| | |
forgot pass
|
|/ |
|
|
|
|
| |
.one calls over to SQLAlchemy queries
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
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!
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
| |
Revert "Always activate testing in every test module ever."
This reverts commit 0536306048daa0970d2e43411ba2a9bf073e570e.
|
|
|
|
| |
Kind of a dorky way to implement this, but...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
convert tests/test_edit.py over to Dot-Notation. It only
accesses the User object.
|
|
|
|
|
|
|
| |
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.
|
|
is given for /edit/profile/
|