MCPcopy Create free account
hub / github.com/DeepL/deepl-python / test_glossary_delete

Function test_glossary_delete

tests/test_cli.py:410–431  ·  view source on GitHub ↗
(translator, runner, glossary_manager)

Source from the content-addressed store, hash-verified

408
409
410def test_glossary_delete(translator, runner, glossary_manager):
411 with glossary_manager() as created_glossary:
412 created_id = created_glossary.glossary_id
413 result = runner.invoke(main_function, "glossary list")
414 assert (
415 result.exit_code == 0
416 ), f"exit: {result.exit_code}\n {result.output}"
417 assert created_id in result.output
418
419 # Remove the created glossary
420 result = runner.invoke(
421 main_function, f'glossary delete "{created_id}"'
422 )
423 assert (
424 result.exit_code == 0
425 ), f"exit: {result.exit_code}\n {result.output}"
426
427 result = runner.invoke(main_function, "glossary list")
428 assert (
429 result.exit_code == 0
430 ), f"exit: {result.exit_code}\n {result.output}"
431 assert created_id not in result.output

Callers

nothing calls this directly

Calls 1

glossary_managerFunction · 0.85

Tested by

no test coverage detected