https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 70331b364df34875ab5711520e24759a140b9eb3 authored by Ms2ger on 13 March 2018, 16:12:19 UTC
Add tests for transferring ImageBitmap objects.
Tip revision: 70331b3
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
back to top