mirror of https://github.com/nucypher/nucypher.git
Only simulate hardcoded domain nodes for TEMPORARY_DOMAIN, not nonstandard test domains.
parent
169fffd41e
commit
ca2e84eb2a
|
@ -23,6 +23,7 @@ from constant_sorrow.constants import CERTIFICATE_NOT_SAVED
|
||||||
from flask import Response
|
from flask import Response
|
||||||
|
|
||||||
from nucypher.characters.lawful import Ursula
|
from nucypher.characters.lawful import Ursula
|
||||||
|
from nucypher.config.constants import TEMPORARY_DOMAIN
|
||||||
from nucypher.network.middleware import NucypherMiddlewareClient, RestMiddleware
|
from nucypher.network.middleware import NucypherMiddlewareClient, RestMiddleware
|
||||||
from tests.utils.ursula import MOCK_KNOWN_URSULAS_CACHE
|
from tests.utils.ursula import MOCK_KNOWN_URSULAS_CACHE
|
||||||
|
|
||||||
|
@ -93,7 +94,11 @@ class MockRestMiddleware(RestMiddleware):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get(_cls, item, default):
|
def get(_cls, item, default):
|
||||||
return tuple(u.rest_url() for u in MOCK_KNOWN_URSULAS_CACHE.values())
|
if item is TEMPORARY_DOMAIN:
|
||||||
|
nodes = tuple(u.rest_url() for u in MOCK_KNOWN_URSULAS_CACHE.values())
|
||||||
|
else:
|
||||||
|
nodes = tuple()
|
||||||
|
return nodes
|
||||||
|
|
||||||
def get_certificate(self, host, port, timeout=3, retry_attempts: int = 3, retry_rate: int = 2,
|
def get_certificate(self, host, port, timeout=3, retry_attempts: int = 3, retry_rate: int = 2,
|
||||||
current_attempt: int = 0):
|
current_attempt: int = 0):
|
||||||
|
|
Loading…
Reference in New Issue