Mercurial > p > roundup > code
comparison test/test_templating.py @ 4011:e77bcbdc9b32
add tests for numbers too :)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 01 Sep 2008 01:49:47 +0000 |
| parents | 797eacd945af |
| children | b6a2251394dd |
comparison
equal
deleted
inserted
replaced
| 4010:797eacd945af | 4011:e77bcbdc9b32 |
|---|---|
| 122 t('r@a.com', email='r@a.com') | 122 t('r@a.com', email='r@a.com') |
| 123 t('i1', **{'class':'i', 'id':'1'}) | 123 t('i1', **{'class':'i', 'id':'1'}) |
| 124 t('item123', **{'class':'item', 'id':'123'}) | 124 t('item123', **{'class':'item', 'id':'123'}) |
| 125 t('www.user:pass@host.net', email='pass@host.net') | 125 t('www.user:pass@host.net', email='pass@host.net') |
| 126 t('user:pass@www.host.net', url='user:pass@www.host.net') | 126 t('user:pass@www.host.net', url='user:pass@www.host.net') |
| 127 t('123.35', nothing=True) | |
| 128 t('-.3535', nothing=True) | |
| 127 | 129 |
| 128 def test_url_replace(self): | 130 def test_url_replace(self): |
| 129 p = StringHTMLProperty(self.client, 'test', '1', None, 'test', '') | 131 p = StringHTMLProperty(self.client, 'test', '1', None, 'test', '') |
| 130 def t(s): return p.hyper_re.sub(p._hyper_repl, s) | 132 def t(s): return p.hyper_re.sub(p._hyper_repl, s) |
| 131 ae = self.assertEquals | 133 ae = self.assertEquals |
