Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display name didnt return the name properly when a comma appeared in it #53

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qreu/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Address(BaseAddress):
@property
def display(self):
if self.display_name:
return '{display_name} <{address}>'.format(**self._asdict())
return '"{display_name}" <{address}>'.format(**self._asdict())
return self.address

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion spec/address_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
expect(r).to(have_property('display_name', 'Firstname Secondname'))

with it('must have a display with a formatted address as on creation'):
addr_str = 'Firstname Secondname <[email protected]>'
addr_str = '"Firstname Secondname" <[email protected]>'
r = parse(addr_str)
expect(r).to(have_property('display', addr_str))
addr_str = '[email protected]'
Expand Down
Loading