Mercurial > p > roundup > code
comparison test/test_templating.py @ 6564:21c7c2041a4b
issue2551181 - allow issueXXX#fragment to generate a link with fragment
There is another ticket to add id's to elements displaying messages in
issue.item.html. This change allows a fast way to link to such an
element in a long issue with many messages once that other issue is
committed and merged into a tracker template.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 15 Dec 2021 23:52:25 -0500 |
| parents | f1f8d75edd97 |
| children | 5b71a50e833b |
comparison
equal
deleted
inserted
replaced
| 6563:ae670ab2dd55 | 6564:21c7c2041a4b |
|---|---|
| 448 | 448 |
| 449 def test_url_replace(self): | 449 def test_url_replace(self): |
| 450 p = StringHTMLProperty(self.client, 'test', '1', None, 'test', '') | 450 p = StringHTMLProperty(self.client, 'test', '1', None, 'test', '') |
| 451 def t(s): return p.hyper_re.sub(p._hyper_repl, s) | 451 def t(s): return p.hyper_re.sub(p._hyper_repl, s) |
| 452 ae = self.assertEqual | 452 ae = self.assertEqual |
| 453 ae(t('issue5#msg10'), '<a href="issue5#msg10">issue5#msg10</a>') | |
| 454 ae(t('issue5'), '<a href="issue5">issue5</a>') | |
| 455 ae(t('issue2255'), 'issue2255') | |
| 453 ae(t('foo https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4 bar'), | 456 ae(t('foo https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4 bar'), |
| 454 'foo <a href="https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4" rel="nofollow noopener">' | 457 'foo <a href="https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4" rel="nofollow noopener">' |
| 455 'https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4</a> bar') | 458 'https://example.com/demo/issue8#24MRV9BZYx:V:1B~sssssssssssssss~4~4</a> bar') |
| 456 ae(t('item123123123123'), 'item123123123123') | 459 ae(t('item123123123123'), 'item123123123123') |
| 457 ae(t('http://roundup.net/'), | 460 ae(t('http://roundup.net/'), |
