changes after cwebb's review
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
direct_remote_path = /test_static/
|
||||
email_sender_address = "notice@mediagoblin.example.org"
|
||||
email_debug_mode = true
|
||||
authentication_disabled = true
|
||||
|
||||
# TODO: Switch to using an in-memory database
|
||||
sql_engine = "sqlite:///%(here)s/user_dev/mediagoblin.db"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
direct_remote_path = /test_static/
|
||||
email_sender_address = "notice@mediagoblin.example.org"
|
||||
email_debug_mode = true
|
||||
authentication_disabled = true
|
||||
|
||||
# TODO: Switch to using an in-memory database
|
||||
sql_engine = "sqlite:///%(here)s/user_dev/mediagoblin.db"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
direct_remote_path = /test_static/
|
||||
email_sender_address = "notice@mediagoblin.example.org"
|
||||
email_debug_mode = true
|
||||
authentication_disabled = true
|
||||
|
||||
# TODO: Switch to using an in-memory database
|
||||
sql_engine = "sqlite:///%(here)s/user_dev/mediagoblin.db"
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
[mediagoblin]
|
||||
direct_remote_path = /test_static/
|
||||
email_sender_address = "notice@mediagoblin.example.org"
|
||||
email_debug_mode = true
|
||||
|
||||
# TODO: Switch to using an in-memory database
|
||||
sql_engine = "sqlite:///%(here)s/user_dev/mediagoblin.db"
|
||||
|
||||
# Celery shouldn't be set up by the application as it's setup via
|
||||
# mediagoblin.init.celery.from_celery
|
||||
celery_setup_elsewhere = true
|
||||
|
||||
[storage:publicstore]
|
||||
base_dir = %(here)s/user_dev/media/public
|
||||
base_url = /mgoblin_media/
|
||||
|
||||
[storage:queuestore]
|
||||
base_dir = %(here)s/user_dev/media/queue
|
||||
|
||||
[celery]
|
||||
CELERY_ALWAYS_EAGER = true
|
||||
CELERY_RESULT_DBURI = "sqlite:///%(here)s/user_dev/celery.db"
|
||||
BROKER_HOST = "sqlite:///%(here)s/user_dev/kombu.db"
|
||||
|
||||
[plugins]
|
||||
@@ -22,7 +22,6 @@ from mediagoblin import mg_globals
|
||||
from mediagoblin.db.models import User
|
||||
from mediagoblin.tests.tools import get_app, fixture_add_user
|
||||
from mediagoblin.tools import template, mail
|
||||
from mediagoblin.auth.tools import AuthError
|
||||
from mediagoblin.auth import tools as auth_tools
|
||||
|
||||
|
||||
@@ -273,7 +272,6 @@ def test_authentication_views(test_app):
|
||||
context = template.TEMPLATE_TEST_CONTEXT['mediagoblin/auth/login.html']
|
||||
form = context['login_form']
|
||||
assert form.username.errors == [u'This field is required.']
|
||||
assert form.password.errors == [u'This field is required.']
|
||||
|
||||
# Failed login - blank user
|
||||
# -------------------------
|
||||
@@ -291,9 +289,7 @@ def test_authentication_views(test_app):
|
||||
response = test_app.post(
|
||||
'/auth/login/', {
|
||||
'username': u'chris'})
|
||||
context = template.TEMPLATE_TEST_CONTEXT['mediagoblin/auth/login.html']
|
||||
form = context['login_form']
|
||||
assert form.password.errors == [u'This field is required.']
|
||||
assert 'mediagoblin/auth/login.html' in template.TEMPLATE_TEST_CONTEXT
|
||||
|
||||
# Failed login - bad user
|
||||
# -----------------------
|
||||
@@ -359,20 +355,6 @@ def test_authentication_views(test_app):
|
||||
assert urlparse.urlsplit(response.location)[2] == '/u/chris/'
|
||||
|
||||
|
||||
# App with authentication_disabled and no auth plugin enabled
|
||||
def no_auth_plugin_app(request):
|
||||
return get_app(
|
||||
request,
|
||||
mgoblin_config=pkg_resources.resource_filename(
|
||||
'mediagoblin.tests.auth_configs',
|
||||
'no_auth_plugin_appconfig.ini'))
|
||||
|
||||
|
||||
def test_auth_plugin_raises(request):
|
||||
with pytest.raises(AuthError):
|
||||
no_auth_plugin_app(request)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def authentication_disabled_app(request):
|
||||
return get_app(
|
||||
|
||||
Reference in New Issue
Block a user