File: common.py

package info (click to toggle)
async-upnp-client 0.46.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,080 kB
  • sloc: python: 11,872; xml: 2,826; sh: 32; makefile: 6
file content (38 lines) | stat: -rw-r--r-- 1,357 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Common test parts."""

from datetime import datetime

from async_upnp_client.utils import CaseInsensitiveDict

ADVERTISEMENT_REQUEST_LINE = "NOTIFY * HTTP/1.1"
ADVERTISEMENT_HEADERS_DEFAULT = CaseInsensitiveDict(
    {
        "CACHE-CONTROL": "max-age=1800",
        "NTS": "ssdp:alive",
        "NT": "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1",
        "USN": "uuid:...::urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1",
        "LOCATION": "http://192.168.1.1:80/RootDevice.xml",
        "BOOTID.UPNP.ORG": "1",
        "SERVER": "Linux/2.0 UPnP/1.0 async_upnp_client/0.1",
        "_timestamp": datetime.now(),
        "_host": "192.168.1.1",
        "_port": "1900",
        "_udn": "uuid:...",
    }
)
SEARCH_REQUEST_LINE = "HTTP/1.1 200 OK"
SEARCH_HEADERS_DEFAULT = CaseInsensitiveDict(
    {
        "CACHE-CONTROL": "max-age=1800",
        "ST": "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1",
        "USN": "uuid:...::urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1",
        "LOCATION": "http://192.168.1.1:80/RootDevice.xml",
        "BOOTID.UPNP.ORG": "1",
        "SERVER": "Linux/2.0 UPnP/1.0 async_upnp_client/0.1",
        "DATE": "Fri, 1 Jan 2021 12:00:00 GMT",
        "_timestamp": datetime.now(),
        "_host": "192.168.1.1",
        "_port": "1900",
        "_udn": "uuid:...",
    }
)