Merge branch 'nginx-mock-external' into argparse-py26

This commit is contained in:
Jakub Warmuz 2015-07-15 16:20:17 +00:00
commit d7eccd5a1a
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA

View file

@ -34,7 +34,9 @@ class NginxConfiguratorTest(util.NginxTest):
self.assertEquals((1, 6, 2), self.config.version)
self.assertEquals(5, len(self.config.parser.parsed))
def test_get_all_names(self):
@mock.patch("letsencrypt_nginx.configurator.socket.gethostbyaddr")
def test_get_all_names(self, mock_gethostbyaddr):
mock_gethostbyaddr.return_value = ('155.225.50.69.nephoscale.net', [], [])
names = self.config.get_all_names()
self.assertEqual(names, set(
["*.www.foo.com", "somename", "another.alias",