mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merge: I was right, hardconding the localhost IP doesn't work in linux-vserver.
This commit is contained in:
commit
477a6eb4a2
1 changed files with 3 additions and 6 deletions
|
@ -290,8 +290,7 @@ class DebuggingServerTests(unittest.TestCase):
|
|||
self.serv_evt.wait()
|
||||
self.output.flush()
|
||||
# Add the X-Peer header that DebuggingServer adds
|
||||
# XXX: I'm not sure hardcoding this IP will work on linux-vserver.
|
||||
m['X-Peer'] = '127.0.0.1'
|
||||
m['X-Peer'] = socket.gethostbyname('localhost')
|
||||
mexpect = '%s%s\n%s' % (MSG_BEGIN, m.as_string(), MSG_END)
|
||||
self.assertEqual(self.output.getvalue(), mexpect)
|
||||
|
||||
|
@ -311,8 +310,7 @@ class DebuggingServerTests(unittest.TestCase):
|
|||
self.serv_evt.wait()
|
||||
self.output.flush()
|
||||
# Add the X-Peer header that DebuggingServer adds
|
||||
# XXX: I'm not sure hardcoding this IP will work on linux-vserver.
|
||||
m['X-Peer'] = '127.0.0.1'
|
||||
m['X-Peer'] = socket.gethostbyname('localhost')
|
||||
# The Bcc header is deleted before serialization.
|
||||
del m['Bcc']
|
||||
mexpect = '%s%s\n%s' % (MSG_BEGIN, m.as_string(), MSG_END)
|
||||
|
@ -341,8 +339,7 @@ class DebuggingServerTests(unittest.TestCase):
|
|||
self.serv_evt.wait()
|
||||
self.output.flush()
|
||||
# Add the X-Peer header that DebuggingServer adds
|
||||
# XXX: I'm not sure hardcoding this IP will work on linux-vserver.
|
||||
m['X-Peer'] = '127.0.0.1'
|
||||
m['X-Peer'] = socket.gethostbyname('localhost')
|
||||
mexpect = '%s%s\n%s' % (MSG_BEGIN, m.as_string(), MSG_END)
|
||||
self.assertEqual(self.output.getvalue(), mexpect)
|
||||
debugout = smtpd.DEBUGSTREAM.getvalue()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue