Mercurial > p > roundup > code
comparison test/test_mailgw.py @ 5248:198b6e810c67
Use Python-3-compatible 'as' syntax for except statements
Many raise statements near these are also fixed.
So are two ivorrect file encoding marks ('utf8'->'utf-8').
| author | Eric S. Raymond <esr@thyrsus.com> |
|---|---|
| date | Thu, 24 Aug 2017 22:21:37 -0400 |
| parents | 65b42fd96c00 |
| children | e20f472fde7d |
comparison
equal
deleted
inserted
replaced
| 5247:7f00a47b3559 | 5248:198b6e810c67 |
|---|---|
| 2162 self.db.security.role['anonymous'].permissions=[] | 2162 self.db.security.role['anonymous'].permissions=[] |
| 2163 anonid = self.db.user.lookup('anonymous') | 2163 anonid = self.db.user.lookup('anonymous') |
| 2164 self.db.user.set(anonid, roles='Anonymous') | 2164 self.db.user.set(anonid, roles='Anonymous') |
| 2165 try: | 2165 try: |
| 2166 self._handle_mail(message) | 2166 self._handle_mail(message) |
| 2167 except Unauthorized, value: | 2167 except Unauthorized as value: |
| 2168 body_diff = self.assertEqual(str(value), """ | 2168 body_diff = self.assertEqual(str(value), """ |
| 2169 You are not a registered user. | 2169 You are not a registered user. |
| 2170 | 2170 |
| 2171 Unknown address: fubar@bork.bork.bork | 2171 Unknown address: fubar@bork.bork.bork |
| 2172 """) | 2172 """) |
| 2181 self.db.security.getPermission('Web Access', None), | 2181 self.db.security.getPermission('Web Access', None), |
| 2182 ] | 2182 ] |
| 2183 self.db.security.role['anonymous'].permissions=p | 2183 self.db.security.role['anonymous'].permissions=p |
| 2184 try: | 2184 try: |
| 2185 self._handle_mail(message) | 2185 self._handle_mail(message) |
| 2186 except Unauthorized, value: | 2186 except Unauthorized as value: |
| 2187 body_diff = self.assertEqual(str(value), """ | 2187 body_diff = self.assertEqual(str(value), """ |
| 2188 You are not a registered user. Please register at: | 2188 You are not a registered user. Please register at: |
| 2189 | 2189 |
| 2190 http://tracker.example/cgi-bin/roundup.cgi/bugs/user?@template=register | 2190 http://tracker.example/cgi-bin/roundup.cgi/bugs/user?@template=register |
| 2191 | 2191 |
