How to use the fauxmo.protocols.Fauxmo.add_http_headers function in fauxmo

To help you get started, we’ve selected a few fauxmo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github n8henrie / fauxmo / tests / test_fauxmo.py View on Github external
def test_content_length() -> None:
    """Test `CONTENT-LENGTH` HTTP header with non-ascii characters.

    https://github.com/n8henrie/fauxmo/issues/70

    """
    assert "CONTENT-LENGTH: 3" in Fauxmo.add_http_headers("foo")
    assert "CONTENT-LENGTH: 4" in Fauxmo.add_http_headers("föo")
github n8henrie / fauxmo / tests / test_fauxmo.py View on Github external
def test_content_length() -> None:
    """Test `CONTENT-LENGTH` HTTP header with non-ascii characters.

    https://github.com/n8henrie/fauxmo/issues/70

    """
    assert "CONTENT-LENGTH: 3" in Fauxmo.add_http_headers("foo")
    assert "CONTENT-LENGTH: 4" in Fauxmo.add_http_headers("föo")