Revision c5719e00d4a7c1e336ae3f047ed5381c159c840d authored by James Graham on 14 March 2018, 15:05:06 UTC, committed by James Graham on 14 March 2018, 15:09:15 UTC
Typically no tests completing means that some error occured, or the user supplied an invalid test path. In either case we should log the problem and return a failure code.
1 parent 716fa06
test_serve.py
from . import serve
def test_make_hosts_file():
hosts = serve.make_hosts_file({
"domains": {"www": "www.foo.bar.test", "www1": "www1.foo.bar.test"},
"not_domains": {"aaa": "aaa.foo.bar.test", "bbb": "bbb.foo.bar.test"}
}, "127.1.1.1")
lines = hosts.split("\n")
assert "127.1.1.1\twww.foo.bar.test" in lines
assert "127.1.1.1\twww1.foo.bar.test" in lines
assert "0.0.0.0\taaa.foo.bar.test" in lines
assert "0.0.0.0\tbbb.foo.bar.test" in lines
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...