Mercurial > kallithea
changeset 988:7f4943c90876 beta
fixed test hg operations script
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 01 Feb 2011 02:16:27 +0100 |
parents | cb8a69bca04e |
children | 801cdb3e0969 |
files | rhodecode/tests/test_hg_operations.py |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/tests/test_hg_operations.py Mon Jan 31 23:53:01 2011 +0100 +++ b/rhodecode/tests/test_hg_operations.py Tue Feb 01 02:16:27 2011 +0100 @@ -73,7 +73,8 @@ sa = get_session() user = sa.query(User).filter(User.username == USER).scalar() - if force: + + if force and user: sa.delete(user) sa.commit() @@ -81,6 +82,9 @@ new_usr = User() new_usr.username = USER new_usr.password = get_crypt_password(PASS) + new_usr.email = 'mail@mail.com' + new_usr.name = 'test' + new_usr.lastname = 'lasttestname' new_usr.active = True sa.add(new_usr) @@ -258,13 +262,14 @@ if __name__ == '__main__': - create_test_user() - #test_clone() + #create_test_user() + test_clone() + test_clone_anonymous_ok() #test_clone_wrong_credentials() - ##test_clone_anonymous_ok() + #test_pull() - test_push_new_file(3) + #test_push_new_file(3) #test_push_wrong_path() #test_push_wrong_credentials()