|
a/Allura/allura/tests/functional/test_home.py |
|
b/Allura/allura/tests/functional/test_home.py |
|
|
1 |
import json
|
1 |
from pylons import g
|
2 |
from pylons import g
|
2 |
from formencode.variabledecode import variable_encode
|
3 |
from formencode.variabledecode import variable_encode
|
3 |
|
4 |
|
4 |
from ming.orm.ormsession import ThreadLocalORMSession
|
5 |
from ming.orm.ormsession import ThreadLocalORMSession
|
5 |
|
6 |
|
|
... |
|
... |
53 |
|
54 |
|
54 |
def test_user_subproject_home_not_profile(self):
|
55 |
def test_user_subproject_home_not_profile(self):
|
55 |
r = self.app.get('/u/test-admin/sub1/')
|
56 |
r = self.app.get('/u/test-admin/sub1/')
|
56 |
assert r.location.endswith('home/'), r.location
|
57 |
assert r.location.endswith('home/'), r.location
|
57 |
r.follow()
|
58 |
r.follow()
|
|
|
59 |
|
|
|
60 |
def test_user_search(self):
|
|
|
61 |
r = self.app.get('/p/test/user_search?term=admi', status=200)
|
|
|
62 |
j = json.loads(r.body)
|
|
|
63 |
assert j['users'][0]['id'].startswith('admi')
|