remove most subtitles
This commit is contained in:
parent
d8f2e03d36
commit
947ef8e833
7 changed files with 13 additions and 46 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import io
|
||||
import logging
|
||||
from types import SimpleNamespace
|
||||
from typing import cast
|
||||
|
||||
from repub.entrypoint import FeedNameFilter, entrypoint, logger, parse_args
|
||||
|
||||
|
|
@ -32,14 +34,17 @@ def test_parse_args_uses_republisher_host_and_port_env_vars(monkeypatch) -> None
|
|||
def test_entrypoint_rejects_invalid_republisher_port(monkeypatch) -> None:
|
||||
monkeypatch.setenv("REPUBLISHER_PORT", "not-a-number")
|
||||
stream = io.StringIO()
|
||||
original_streams = [handler.stream for handler in logger.handlers]
|
||||
for handler in logger.handlers:
|
||||
handlers = [
|
||||
cast(logging.StreamHandler[io.StringIO], handler) for handler in logger.handlers
|
||||
]
|
||||
original_streams = [handler.stream for handler in handlers]
|
||||
for handler in handlers:
|
||||
handler.stream = stream
|
||||
|
||||
try:
|
||||
exit_code = entrypoint(["serve"])
|
||||
finally:
|
||||
for handler, original_stream in zip(logger.handlers, original_streams):
|
||||
for handler, original_stream in zip(handlers, original_streams):
|
||||
handler.stream = original_stream
|
||||
|
||||
assert exit_code == 2
|
||||
|
|
|
|||
|
|
@ -388,7 +388,6 @@ def test_render_sources_shows_table_and_create_link() -> None:
|
|||
async def run() -> None:
|
||||
body = str(await render_sources())
|
||||
|
||||
assert "Configured feed and Pangea sources live here as tables" in body
|
||||
assert ">Sources<" in body
|
||||
assert 'href="/sources/create"' in body
|
||||
assert "guardian-feed" not in body
|
||||
|
|
@ -401,7 +400,7 @@ def test_render_create_source_shows_dedicated_form_page() -> None:
|
|||
async def run() -> None:
|
||||
body = str(await render_create_source())
|
||||
|
||||
assert "Create a new source and its paired job configuration." in body
|
||||
assert ">Create source<" in body
|
||||
assert "Source and job setup" in body
|
||||
assert "data-signals__ifmissing" in body
|
||||
assert "/actions/sources/create" in body
|
||||
|
|
@ -890,7 +889,6 @@ def test_render_execution_logs_uses_app_route(monkeypatch, tmp_path: Path) -> No
|
|||
|
||||
assert f"Job {job.id} / execution {execution.get_id()}" in body
|
||||
assert f"/job/{job.id}/execution/{execution.get_id()}/logs" in body
|
||||
assert "Route: /job/" in body
|
||||
assert "waiting for more log lines" in body
|
||||
|
||||
asyncio.run(run())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue