Removed a few more unicode literals.

This commit is contained in:
Maurits van Rees 2022-05-02 17:12:04 +02:00
parent bcb9315772
commit e81e26c02b
No known key found for this signature in database
GPG Key ID: AAEC1E5318E6FCCE
4 changed files with 5 additions and 9 deletions

View File

@ -58,13 +58,13 @@ comment form with the "website" field::
# Interface to define the fields we want to add to the comment form. # Interface to define the fields we want to add to the comment form.
class ICommentExtenderFields(Interface): class ICommentExtenderFields(Interface):
website = schema.TextLine(title=u"Website", required=False) website = schema.TextLine(title="Website", required=False)
# Persistent class that implements the ICommentExtenderFields interface # Persistent class that implements the ICommentExtenderFields interface
@adapter(Comment) @adapter(Comment)
class CommentExtenderFields(Persistent): class CommentExtenderFields(Persistent):
interface.implements(ICommentExtenderFields) interface.implements(ICommentExtenderFields)
website = u"" website = ""
# CommentExtenderFields factory # CommentExtenderFields factory
CommentExtenderFactory = factory(CommentExtenderFields) CommentExtenderFactory = factory(CommentExtenderFields)

View File

@ -20,8 +20,8 @@ configure.zcml::
Define an interface IMyDexterityContentType groked schema, I added:: Define an interface IMyDexterityContentType groked schema, I added::
allowDiscussion = schema.Bool( allowDiscussion = schema.Bool(
title=_(u"Allow Users to Comment"), title=_("Allow Users to Comment"),
description=_(u"Allow users to commemt on you. Comments description=_("Allow users to comment on you. Comments
are shown at the end of each page"), are shown at the end of each page"),
required=True, required=True,
default=True, default=True,

View File

@ -252,7 +252,7 @@ Now we can post an anonymous comment.
>>> unprivileged_browser.open(urldoc) >>> unprivileged_browser.open(urldoc)
>>> unprivileged_browser.getControl(name='form.widgets.text').value = "This is an anonymous comment" >>> unprivileged_browser.getControl(name='form.widgets.text').value = "This is an anonymous comment"
>>> unprivileged_browser.getControl(name='form.widgets.author_name').value = u'John' >>> unprivileged_browser.getControl(name='form.widgets.author_name').value = 'John'
>>> unprivileged_browser.getControl(name='form.widgets.author_email').value = 'john@acme.com' >>> unprivileged_browser.getControl(name='form.widgets.author_email').value = 'john@acme.com'
>>> unprivileged_browser.getControl(name='form.buttons.comment').click() >>> unprivileged_browser.getControl(name='form.buttons.comment').click()

View File

@ -77,8 +77,6 @@ class TestUserNotificationUnit(unittest.TestCase):
"plone.app.discussion.interfaces.IDiscussionSettings" "plone.app.discussion.interfaces.IDiscussionSettings"
+ ".user_notification_enabled" + ".user_notification_enabled"
] = True ] = True
# Archetypes content types store data as utf-8 encoded strings
# The missing u in front of a string is therefor not missing
self.portal.doc1.title = "Kölle Alaaf" # What is 'Fasching'? self.portal.doc1.title = "Kölle Alaaf" # What is 'Fasching'?
self.conversation = IConversation(self.portal.doc1) self.conversation = IConversation(self.portal.doc1)
@ -220,8 +218,6 @@ class TestModeratorNotificationUnit(unittest.TestCase):
"plone.app.discussion.interfaces.IDiscussionSettings." "plone.app.discussion.interfaces.IDiscussionSettings."
+ "moderator_notification_enabled" + "moderator_notification_enabled"
] = True ] = True
# Archetypes content types store data as utf-8 encoded strings
# The missing u in front of a string is therefor not missing
self.portal.doc1.title = "Kölle Alaaf" # What is 'Fasching'? self.portal.doc1.title = "Kölle Alaaf" # What is 'Fasching'?
self.conversation = IConversation(self.portal.doc1) self.conversation = IConversation(self.portal.doc1)