Turn hostname from str into bytes.
This fixes the following two failed unit tests:
===============================================================================
[FAIL]
Traceback (most recent call last):
File "/home/travis/build/NullHypothesis/bridgedb/bridgedb/test/test_email_server.py", line 549, in test_addServer
noisy=True)
File "/home/travis/build/NullHypothesis/bridgedb/bridgedb/test/test_email_server.py", line 381, in _test
self.assertSubstring(expected, recv)
File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/twisted/trial/_synctest.py", line 571, in assertSubstring
return self.failUnlessIn(substring, astring, msg)
File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/twisted/trial/_synctest.py", line 492, in assertIn
% (containee, container))
twisted.trial.unittest.FailTest: '250 Delivery in progress' not in '220 bridges.torproject.org NO UCE NO UBE NO RELAY PROBES\r\n250 bridges.torproject.org Hello 192.168.1.1, nice to meet you\r\n550 Cannot receive from specified address <testing@travis-job-
29d1fb7f-84ab-4139-977c-
5f18fc201f57>: Sender not acceptable\r\n503 Must have sender before recipient\r\n503 Must have valid receiver and originator\r\n500 Command not implemented\r\n500 Command not implemented\r\n500 Command not implemented\r\n500 Error: bad syntax\r\n500 Command not implemented\r\n500 Command not implemented\r\n'
bridgedb.test.test_email_server.EmailServerServiceTests.test_addServer
===============================================================================
[FAIL]
Traceback (most recent call last):
File "/home/travis/build/NullHypothesis/bridgedb/bridgedb/test/test_email_server.py", line 422, in test_SMTPIncomingServerFactory_MAIL_FROM_testing_at_gethostname
"250 Sender address accepted")
File "/home/travis/build/NullHypothesis/bridgedb/bridgedb/test/test_email_server.py", line 381, in _test
self.assertSubstring(expected, recv)
File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/twisted/trial/_synctest.py", line 571, in assertSubstring
return self.failUnlessIn(substring, astring, msg)
File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/twisted/trial/_synctest.py", line 492, in assertIn
% (containee, container))
twisted.trial.unittest.FailTest: '250 Sender address accepted' not in '220 bridges.torproject.org NO UCE NO UBE NO RELAY PROBES\r\n250 bridges.torproject.org Hello 192.168.1.1, nice to meet you\r\n550 Cannot receive from specified address <testing@travis-job-
29d1fb7f-84ab-4139-977c-
5f18fc201f57>: Sender not acceptable\r\n'
bridgedb.test.test_email_server.SMTPIncomingServerFactoryTests.test_SMTPIncomingServerFactory_MAIL_FROM_testing_at_gethostname
===============================================================================