|
a/Allura/allura/tests/test_globals.py |
|
b/Allura/allura/tests/test_globals.py |
|
... |
|
... |
274 |
@with_setup(setUp)
|
274 |
@with_setup(setUp)
|
275 |
def test_myprojects_macro():
|
275 |
def test_myprojects_macro():
|
276 |
h.set_context('u/%s' % (c.user.username), 'wiki', neighborhood='Users')
|
276 |
h.set_context('u/%s' % (c.user.username), 'wiki', neighborhood='Users')
|
277 |
r = g.markdown_wiki.convert('[[my_projects]]')
|
277 |
r = g.markdown_wiki.convert('[[my_projects]]')
|
278 |
for p in c.user.my_projects():
|
278 |
for p in c.user.my_projects():
|
279 |
if p.deleted or p.shortname == '--init--':
|
279 |
if p.deleted or p.is_nbhd_project:
|
280 |
continue
|
280 |
continue
|
281 |
proj_title = '<h2><a href="%s">%s</a></h2>' % (p.url(), p.name)
|
281 |
proj_title = '<h2><a href="%s">%s</a></h2>' % (p.url(), p.name)
|
282 |
assert proj_title in r
|
282 |
assert proj_title in r
|
283 |
|
283 |
|
284 |
h.set_context('u/test-user-1', 'wiki', neighborhood='Users')
|
284 |
h.set_context('u/test-user-1', 'wiki', neighborhood='Users')
|
285 |
user = M.User.query.get(username='test-user-1')
|
285 |
user = M.User.query.get(username='test-user-1')
|
286 |
r = g.markdown_wiki.convert('[[my_projects]]')
|
286 |
r = g.markdown_wiki.convert('[[my_projects]]')
|
287 |
for p in user.my_projects():
|
287 |
for p in user.my_projects():
|
288 |
if p.deleted or p.shortname == '--init--':
|
288 |
if p.deleted or p.is_nbhd_project:
|
289 |
continue
|
289 |
continue
|
290 |
proj_title = '<h2><a href="%s">%s</a></h2>' % (p.url(), p.name)
|
290 |
proj_title = '<h2><a href="%s">%s</a></h2>' % (p.url(), p.name)
|
291 |
assert proj_title in r
|
291 |
assert proj_title in r
|
292 |
|
292 |
|
293 |
@with_setup(setUp)
|
293 |
@with_setup(setUp)
|