| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
.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
|
| |
| |
| |
| |
| |
| |
| | |
It's not complete, but it makes clearer how to avoid errors with
fake_upload :)
This commit sponsored by Harper Sanford. Thank you!
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Added request.notifications
- Email configuration fixes
- Set config_spec default SMTP port to `0` and switch to SSL/non-SSL
default if `port == 0`
- Added email_smtp_use_ssl configuration setting
- Added migrations for notification tables
- Added __repr__ to MediaComment(Mixin)
- Added MediaComment.get_entry => MediaEntry
- Added CommentSubscription, CommentNotification, Notification,
ProcessingNotification tables
- Added notifications.task to celery init
- Fixed a bug in the video transcoder where pygst would hijack the
--help argument.
- Added notifications
- views
- silence
- subscribe
- routes
- utility methods
- celery task
- Added half-hearted .active comment CSS style
- Added quick JS to show header_dropdown
- Added fragment template to show notifications in header_dropdown
- Added fragment template to show subscribe/unsubscribe buttons on
media/comment pages
- Updated celery setup tests with notifications.task
- Tried to fix test_misc tests that I broke
- Added notification tests
- Added and extended tests.tools fixtures
- Integrated new notifications into media_home, media_post_comment views
- Bumped SQLAlchemy dependency to >= 0.8.0 since we need polymorphic for
the notifications to work
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
serving
The test_user_dev (as opposed to user_dev) was a legacy before we had
each application running in its own directory (as they now do in
pytest). Move that name to just user_dev... this is more consistent
with the rest of our naming and will make writing these config files
easier. (If we want to test that changing these still works, that
should be a separate unit test with special config files.)
Additionally, add plugin static serving to the common test paste
config file.
This commit sponsored by Juan Jose Marin Martinez. Thank you!
|
|
|
|
|
|
|
|
|
| |
in app instead
This should remove a bunch of confusing cruft. I hate using that
environment variable! Also that old code was fragile.
This commit sponsored by Stephen Milton. Thanks!
|
|\
| |
| |
| | |
This merges the patch for Issue #548.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Initially I was going to write a failing test for refresh tokens. Thus
this fix includes an orphaned 'expect_failure' method in test utils.
I ended up writing support for OAuth refresh tokens, as well as a lot of
cleanup (hopefully) in the OAuth plugin code.
**Rebase**: While waiting for this stuff to be merged, the testing
framework changed, it comes with batteries included regarding fails.
Removed legacy nosetest helper.
Also added a lot of backref=backref([...], cascade='all, delete-orphan')
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* brett/itsdangerous:
Call is_updated instead of testing it boolean.
Harden It's Dangerous key management.
First tests for the Session class.
Set a starting value for session.send_new_cookie.
Remove beaker stuff from the code.
Delete the session cookie on an empty session.
Back sessions with It's Dangerous.
Improve fs security for itsdangerous secret.
Docs for get_timed_signer_url.
Basic itsdangerous infrastructure.
Conflicts:
mediagoblin/tests/test_cache.py
|
| | |
| | |
| | |
| | | |
This is all obsoleted by It's Dangerous.
|
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| | |
This way people can pass in particular paste/mediagoblin configs that they want to use.
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
This currently fails (with foreign key constrain error):
1. Have user A and B.
2. User B creates media M.
3. User A post a comment on M.
4. User A deletes his own account.
The test is a little bit wider.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Don't do "user = getUser() or newUser()" in one line. It is bound to
confuse poor souls. Be more explicit here and even add a code comment.
Thanks to Elrond for not liking the previous pattern.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
|
|
| |
When the tests want to create a new user, don't fail if it already
exists and just reuse the existing one. This allows us to run tests
without dumping the whole database if that is not needed for the tests.
The upcoming tests for test_edit will make use of this.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
|
| |
This concludes the db.sql.* -> db.* move. Our db abstraction layer is
sqlalchemy, so there is no need to a separate db.sql.* hierarchy.
All tests have been run for each of the commit series to make sure
everything works at every step.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace webob usage in one more file. Document a TODO that should
be clarified, we should probably be using json_response rather than
Response() here.
Modify the TestMeddleware to not rely on the content_type attribute
being present, while werkzeug.wrappers Response() has it the BaseResponse()
object which is often returned in tests does not have it.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were refering to model._id in most of the code base as this is
what Mongo uses. However, each use of _id required a) fixup of queries:
e.g. what we did in our find() and find_one() functions moving all
'_id' to 'id'. It also required using AliasFields to make the ._id
attribute available. This all means lots of superfluous fixing and
transitioning in a SQL world.
It will also not work in the long run. Much newer code already refers
to the objects by model.id (e.g. in the oauth plugin), which will break
with Mongo. So let's be honest, rip out the _id mongoism and live with
.id as the one canonical way to address objects.
This commit modifies all users and providers of model._id to use
model.id instead. This patch works with or without Mongo removed first,
but will break Mongo usage (even more than before)
I have not bothered to fixup db.mongo.* and db.sql.convert
(which converts from Mongo to SQL)
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
| |
|
| |
|
|
|
|
|
| |
- Adapt tests to new global_config arg for run_dbupdate
- Account for [plugins] not being set in config
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The code often needs to know some fields of the test user
even after doing some sql and stuff. The solultion is to
reload it and properly detach it from its Session. That way
all its fields are available and the whole thing is not
connected to a session. It feels like a normal object.
|
|
|
|
|
|
| |
- Changed config files of test configs to use SQL
- Updated celery initialization tools, factored them to be able to
use the "big instance" application stuff
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Created a BaseMeddleware which all Meddleware should derive
from. This is not strictly needed, but will greatly help.
The base class has the common __init__ of all the other
Meddlwares and fall backs for all hooks. That way a new
Meddlware only needs to override what it actually wants to
implement.
|
|
|
|
|
|
| |
middleware
hehehehehe, "meddleware"
|
|
|
|
|
| |
This middleware isn't needed outside of the tests, so let's
just put it there.
|
|
|
|
|
| |
To make the TestingMiddleware actually more useful in the
future, start to document it.
|
|
|
|
|
|
|
|
|
| |
All references to static, shipped content should go via
request.staticdirect().
So insert a TestingMiddleware in the chain, which tests for
this on all requests/reponses happening in the test suite.
It's a simple text search for a bogus usage pattern.
|
| |
|
| |
|
| |
|
|
|
|
| |
Thought I installed these... guess I didn't!
|
|
|
|
|
|
|
| |
Some simple changes needed to do that.
The interesting question left:
Should config_spec.ini also be moved?
|
|
|
|
|
|
| |
As the first target of the new .init. submodule move
celery_setup there. Quite straight forward, just a lot of
places to change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Basically, if we don't do this celery sets itself up before it should
and improperly. :\
|
|
|
|
|
|
|
|
|
| |
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.
|