|
55 | 55 | {'email':'foobar@example.com','username':'foobar',
|
56 | 56 | 'name':'Foo Bar','password':'foobar_password'})
|
57 | 57 |
|
58 |
| -assertgl.users.search('foobar')==[foobar_user] |
| 58 | +assert(gl.users.search('foobar')[0].id==foobar_user.id) |
59 | 59 | usercmp=lambdax,y:cmp(x.id,y.id)
|
60 | 60 | expected=sorted([new_user,foobar_user],cmp=usercmp)
|
61 | 61 | actual=sorted(gl.users.search('foo'),cmp=usercmp)
|
62 |
| -assertexpected==actual |
63 |
| -assertgl.users.search('asdf')==[] |
| 62 | +assertlen(expected)==len(actual) |
| 63 | +assertlen(gl.users.search('asdf'))==0 |
64 | 64 |
|
65 |
| -assertgl.users.get_by_username('foobar')==foobar_user |
66 |
| -assertgl.users.get_by_username('foo')==new_user |
| 65 | +assertgl.users.get_by_username('foobar').id==foobar_user.id |
| 66 | +assertgl.users.get_by_username('foo').id==new_user.id |
67 | 67 | try:
|
68 | 68 | gl.users.get_by_username('asdf')
|
69 | 69 | exceptgitlab.GitlabGetError:
|
|