diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2011-11-21 12:56:26 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2011-12-05 21:08:58 +0100 |
commit | 4ec5717a173803e6ccebf7fced1e5127c8b52caa (patch) | |
tree | f86e60503e9617dca5d83eee14236cdbc1cd5857 | |
parent | 2d540fed8b511c76819a836da3d62875d20b6547 (diff) | |
download | mediagoblin-4ec5717a173803e6ccebf7fced1e5127c8b52caa.tar.lz mediagoblin-4ec5717a173803e6ccebf7fced1e5127c8b52caa.tar.xz mediagoblin-4ec5717a173803e6ccebf7fced1e5127c8b52caa.zip |
Dot-Notation: tests/test_edit.py
convert tests/test_edit.py over to Dot-Notation. It only
accesses the User object.
-rw-r--r-- | mediagoblin/tests/test_edit.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mediagoblin/tests/test_edit.py b/mediagoblin/tests/test_edit.py index c29ddfe9..0cf71e9b 100644 --- a/mediagoblin/tests/test_edit.py +++ b/mediagoblin/tests/test_edit.py @@ -44,7 +44,7 @@ def test_change_password(test_app): # test_user has to be fetched again in order to have the current values test_user = mg_globals.database.User.one({'username': 'chris'}) - assert bcrypt_check_password('123456', test_user['pw_hash']) + assert bcrypt_check_password('123456', test_user.pw_hash) # test that the password cannot be changed if the given old_password # is wrong @@ -59,7 +59,7 @@ def test_change_password(test_app): test_user = mg_globals.database.User.one({'username': 'chris'}) - assert not bcrypt_check_password('098765', test_user['pw_hash']) + assert not bcrypt_check_password('098765', test_user.pw_hash) @setup_fresh_app @@ -76,8 +76,8 @@ def change_bio_url(test_app): test_user = mg_globals.database.User.one({'username': 'chris'}) - assert test_user['bio'] == u'I love toast!' - assert test_user['url'] == u'http://dustycloud.org/' + assert test_user.bio == u'I love toast!' + assert test_user.url == u'http://dustycloud.org/' # test changing the bio and the URL inproperly too_long_bio = 150 * 'T' + 150 * 'o' + 150 * 'a' + 150 * 's' + 150* 't' |