mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 21:24:28 +00:00
Fix tests
This commit is contained in:
parent
b7681b3a02
commit
61624b6e75
4 changed files with 6 additions and 5 deletions
3
app.py
3
app.py
|
@ -88,7 +88,8 @@ from utils.media import Kind
|
|||
|
||||
from poussetaches import PousseTaches
|
||||
|
||||
p = PousseTaches("http://poussetaches:7991", "http://web:5005")
|
||||
phost = "http://" + os.getenv("COMPOSE_PROJECT_NAME", "")
|
||||
p = PousseTaches(f"{phost}_poussetaches_1:7991", f"{phost}_web_1:5005")
|
||||
|
||||
|
||||
back = activitypub.MicroblogPubBackend()
|
||||
|
|
|
@ -9,8 +9,9 @@ services:
|
|||
- "./static:/app/static"
|
||||
environment:
|
||||
- MICROBLOGPUB_AMQP_BROKER=pyamqp://guest@rmq//
|
||||
- MICROBLOGPUB_MONGODB_HOST=mongo:27017
|
||||
- MICROBLOGPUB_MONGODB_HOST=${COMPOSE_PROJECT_NAME}_mongo_1:27017
|
||||
- MICROBLOGPUB_DEBUG=1
|
||||
- COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME}
|
||||
- POUSSETACHES_AUTH_KEY=123
|
||||
celery:
|
||||
# image: "instance1_web"
|
||||
|
|
|
@ -45,4 +45,4 @@ class PousseTaches:
|
|||
print(f"envelope={envelope!r}")
|
||||
payload = json.loads(base64.b64decode(envelope["payload"]))
|
||||
|
||||
return Task(req_id=envelope["req_id"], tries=envelope["tries"], payload=payload)
|
||||
return Task(req_id=envelope["req_id"], tries=envelope["tries"], payload=payload) # type: ignore
|
||||
|
|
|
@ -19,7 +19,7 @@ class Instance(object):
|
|||
def __init__(self, name, host_url, docker_url=None):
|
||||
self.host_url = host_url
|
||||
self.docker_url = docker_url or host_url
|
||||
self._create_delay = 60
|
||||
self._create_delay = 15
|
||||
with open(
|
||||
os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
|
@ -50,7 +50,6 @@ class Instance(object):
|
|||
|
||||
def debug(self):
|
||||
"""Returns the debug infos (number of items in the inbox/outbox."""
|
||||
time.sleep(self._create_delay)
|
||||
resp = requests.get(
|
||||
f"{self.host_url}/api/debug",
|
||||
headers={**self._auth_headers, "Accept": "application/json"},
|
||||
|
|
Loading…
Reference in a new issue