| 222 | | |
| 223 | | No newline at end of file |
| | 222 | |
| | 223 | def testCommentDoneReSubmitWithInvalidParams(self): |
| | 224 | """ |
| | 225 | If the comment-done url is resubmitted with some invalid data |
| | 226 | ie mainly some non-integer, then a UnicodeEncodeError (a sub-class |
| | 227 | of ValueError). |
| | 228 | """ |
| | 229 | a = Article.objects.get(pk=1) |
| | 230 | data = self.getValidData(a) |
| | 231 | data["comment"] = "This is another comment" |
| | 232 | response = self.client.post("/post/", data) |
| | 233 | location = response["Location"] |
| | 234 | new_location = location + u"\ufffd" |
| | 235 | x = lambda : self.client.get(new_location) |
| | 236 | self.assertRaises(ValueError, x) |