Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IS-04-01] Much smaller zeroconf monkey patch #812

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nmostesting/NMOSTesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
from .mocks.Registry import NUM_REGISTRIES, REGISTRIES, REGISTRY_API
from .mocks.System import NUM_SYSTEMS, SYSTEMS, SYSTEM_API
from .mocks.Auth import AUTH_API, PRIMARY_AUTH, SECONDARY_AUTH
from zeroconf_monkey import Zeroconf
from zeroconf import Zeroconf

# Make ANSI escape character sequences (for producing coloured terminal text) work under Windows
try:
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/mocks/Auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from ..Config import PORT_BASE, KEYS_MOCKS, ENABLE_HTTPS, CERT_TRUST_ROOT_CA, JWKS_URI, REDIRECT_URI, SCOPE, CACHE_PATH
from ..TestHelper import get_default_ip, get_mocks_hostname, load_resolved_schema, check_content_type
from ..IS10Utils import IS10Utils
from zeroconf_monkey import ServiceInfo
from zeroconf import ServiceInfo
from enum import Enum
from werkzeug.serving import make_server
from http import HTTPStatus
Expand Down
6 changes: 5 additions & 1 deletion nmostesting/suites/IS0401Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@
from copy import deepcopy
from collections import defaultdict
from pathlib import Path
from zeroconf_monkey import ServiceBrowser, ServiceInfo, Zeroconf
from zeroconf import ServiceBrowser, ServiceInfo, Zeroconf

from .. import Config as CONFIG
from ..MdnsListener import MdnsListener
from ..GenericTest import GenericTest, NMOSTestException, NMOS_WIKI_URL
from ..IS04Utils import IS04Utils
from ..TestHelper import get_default_ip, is_ip_address, load_resolved_schema, check_content_type

# monkey patch zeroconf to allow us to advertise "_nmos-registration._tcp"
from zeroconf import service_type_name
service_type_name.__kwdefaults__['strict'] = False

NODE_API_KEY = "node"
RECEIVER_CAPS_KEY = "receiver-caps"
CAPS_REGISTER_KEY = "caps-register"
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/suites/IS0402Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from time import sleep
from jsonschema import ValidationError
from urllib.parse import urlparse
from zeroconf_monkey import ServiceBrowser, Zeroconf
from zeroconf import ServiceBrowser, Zeroconf

from .. import Config as CONFIG
from ..MdnsListener import MdnsListener
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/suites/IS0403Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import time
import socket

from zeroconf_monkey import ServiceBrowser, Zeroconf
from zeroconf import ServiceBrowser, Zeroconf
from ..MdnsListener import MdnsListener
from ..GenericTest import GenericTest, NMOS_WIKI_URL
from ..IS04Utils import IS04Utils
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/suites/IS0902Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import time
import socket
from zeroconf_monkey import ServiceInfo, Zeroconf
from zeroconf import ServiceInfo, Zeroconf

from .. import Config as CONFIG
from ..MdnsListener import MdnsListener
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/suites/IS1001Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from ..GenericTest import GenericTest, NMOSTestException, NMOSInitException
from .. import Config as CONFIG
from zeroconf_monkey import ServiceBrowser, Zeroconf
from zeroconf import ServiceBrowser, Zeroconf
from ..MdnsListener import MdnsListener
from ..TestHelper import check_content_type

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
flask>=2.0.0
wtforms
jsonschema
zeroconf-monkey>=1.0.0
zeroconf>=0.32.0
requests
netifaces
gitpython
Expand Down