def test_valid_utf8(self): request = testing.DummyRequest( user=self.user1, remote_addr="0.0.0.0", method="POST", POST={"post_id": self.post.id, "comment": u"こんにちは世界"} ) comment_create(request) cs = [comment.body for comment in self.post.comments] self.assertIn(u"こんにちは世界", cs)
def test_valid_utf8(self): request = testing.DummyRequest(user=self.user1, remote_addr="0.0.0.0", method="POST", POST={ "post_id": self.post.id, "comment": u"こんにちは世界" }) comment_create(request) cs = [comment.body for comment in self.post.comments] self.assertIn(u"こんにちは世界", cs)
def test_white(self): request = testing.DummyRequest( user=self.user1, remote_addr="0.0.0.0", method="POST", POST={"post_id": self.post.id, "comment": u" "}, ) info = comment_create(request) self.assertIn("comment", info["form"].form.errors)
def test_white(self): request = testing.DummyRequest(user=self.user1, remote_addr="0.0.0.0", method="POST", POST={ "post_id": self.post.id, "comment": u" " }) info = comment_create(request) self.assertIn("comment", info["form"].form.errors)