aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_edit.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-06-21 17:24:33 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-06-21 17:24:33 -0500
commitf7698af1c118afa4f0db10cc0359d2b8b0e319b4 (patch)
tree70418245ca481226d6f6bc9855378ecf2c153645 /mediagoblin/tests/test_edit.py
parentc482f0149d566156c4017fa58a8d57ffde90b1dc (diff)
downloadmediagoblin-f7698af1c118afa4f0db10cc0359d2b8b0e319b4.tar.lz
mediagoblin-f7698af1c118afa4f0db10cc0359d2b8b0e319b4.tar.xz
mediagoblin-f7698af1c118afa4f0db10cc0359d2b8b0e319b4.zip
Removing the "enter your password to change your email" bit.
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!
Diffstat (limited to 'mediagoblin/tests/test_edit.py')
-rw-r--r--mediagoblin/tests/test_edit.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/mediagoblin/tests/test_edit.py b/mediagoblin/tests/test_edit.py
index 76fd5ee9..2afc519a 100644
--- a/mediagoblin/tests/test_edit.py
+++ b/mediagoblin/tests/test_edit.py
@@ -144,31 +144,6 @@ class TestUserEdit(object):
def test_email_change(self, test_app):
self.login(test_app)
- # Test email change without password
- template.clear_test_template_context()
- test_app.post(
- '/edit/account/', {
- 'new_email': 'new@example.com'})
-
- # Check form errors
- context = template.TEMPLATE_TEST_CONTEXT[
- 'mediagoblin/edit/edit_account.html']
- assert context['form'].password.errors == [
- u'This field is required.']
-
- # Test email change with wrong password
- template.clear_test_template_context()
- test_app.post(
- '/edit/account/', {
- 'new_email': 'new@example.com',
- 'password': 'wrong'})
-
- # Check form errors
- context = template.TEMPLATE_TEST_CONTEXT[
- 'mediagoblin/edit/edit_account.html']
- assert context['form'].password.errors == [
- u'Wrong password.']
-
# Test email already in db
template.clear_test_template_context()
test_app.post(
@@ -182,19 +157,6 @@ class TestUserEdit(object):
assert context['form'].new_email.errors == [
u'Sorry, a user with that email address already exists.']
- # Test password is too short
- template.clear_test_template_context()
- test_app.post(
- '/edit/account/', {
- 'new_email': 'new@example.com',
- 'password': 't'})
-
- # Check form errors
- context = template.TEMPLATE_TEST_CONTEXT[
- 'mediagoblin/edit/edit_account.html']
- assert context['form'].password.errors == [
- u'Field must be between 5 and 1024 characters long.']
-
# Test successful email change
template.clear_test_template_context()
res = test_app.post(