Show More
@@ -73,7 +73,8 b' def create_test_user(force=True):' | |||||
73 | sa = get_session() |
|
73 | sa = get_session() | |
74 |
|
74 | |||
75 | user = sa.query(User).filter(User.username == USER).scalar() |
|
75 | user = sa.query(User).filter(User.username == USER).scalar() | |
76 | if force: |
|
76 | ||
|
77 | if force and user: | |||
77 | sa.delete(user) |
|
78 | sa.delete(user) | |
78 | sa.commit() |
|
79 | sa.commit() | |
79 |
|
80 | |||
@@ -81,6 +82,9 b' def create_test_user(force=True):' | |||||
81 | new_usr = User() |
|
82 | new_usr = User() | |
82 | new_usr.username = USER |
|
83 | new_usr.username = USER | |
83 | new_usr.password = get_crypt_password(PASS) |
|
84 | new_usr.password = get_crypt_password(PASS) | |
|
85 | new_usr.email = 'mail@mail.com' | |||
|
86 | new_usr.name = 'test' | |||
|
87 | new_usr.lastname = 'lasttestname' | |||
84 | new_usr.active = True |
|
88 | new_usr.active = True | |
85 |
|
89 | |||
86 | sa.add(new_usr) |
|
90 | sa.add(new_usr) | |
@@ -258,13 +262,14 b' def test_push_wrong_path():' | |||||
258 |
|
262 | |||
259 |
|
263 | |||
260 | if __name__ == '__main__': |
|
264 | if __name__ == '__main__': | |
261 | create_test_user() |
|
265 | #create_test_user() | |
262 |
|
|
266 | test_clone() | |
|
267 | test_clone_anonymous_ok() | |||
263 |
|
268 | |||
264 | #test_clone_wrong_credentials() |
|
269 | #test_clone_wrong_credentials() | |
265 | ##test_clone_anonymous_ok() |
|
270 | ||
266 | #test_pull() |
|
271 | #test_pull() | |
267 | test_push_new_file(3) |
|
272 | #test_push_new_file(3) | |
268 | #test_push_wrong_path() |
|
273 | #test_push_wrong_path() | |
269 | #test_push_wrong_credentials() |
|
274 | #test_push_wrong_credentials() | |
270 |
|
275 |
General Comments 0
You need to be logged in to leave comments.
Login now