remove test hackery

This commit is contained in:
Noah Swartz 2016-01-29 17:11:05 -08:00
parent 7d63a0c8df
commit 36e2c9a992
2 changed files with 3 additions and 8 deletions

View file

@ -161,8 +161,9 @@ class TwoVhost80Test(util.ApacheTest):
def test_choose_vhost_select_vhost_non_ssl(self, mock_select):
mock_select.return_value = self.vh_truth[0]
chosen_vhost = self.config.choose_vhost("none.com")
self.vh_truth[0].aliases.add("none.com")
self.assertEqual(
self.vh_truth[6].get_names(), chosen_vhost.get_names())
self.vh_truth[0].get_names(), chosen_vhost.get_names())
# Make sure we go from HTTP -> HTTPS
self.assertFalse(self.vh_truth[0].ssl)

View file

@ -150,14 +150,8 @@ def get_vh_truth(temp_dir, config_name):
os.path.join(prefix, "default-ssl-port-only.conf"),
os.path.join(aug_pre, ("default-ssl-port-only.conf/"
"IfModule/VirtualHost")),
set([obj.Addr.fromstring("_default_:443")]), True, False),
obj.VirtualHost(
os.path.join(prefix, "encryption-example.conf"),
os.path.join(aug_pre, "encryption-example.conf/VirtualHost"),
set([obj.Addr.fromstring("*:80")]),
False, True, "encryption-example.demo")
set([obj.Addr.fromstring("_default_:443")]), True, False)
]
vh_truth[6].aliases.add("none.com")
return vh_truth
return None # pragma: no cover