MCPcopy
hub / github.com/lektor/lektor / test_unicode_attachment_filename

Function test_unicode_attachment_filename

tests/test_unicode.py:27–37  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

25
26
27def test_unicode_attachment_filename(tmpdir):
28 pad, builder = get_unicode_builder(tmpdir)
29
30 with BufferReporter(builder.env) as reporter:
31 prog, _ = builder.build(pad.root.attachments.first())
32
33 failures = reporter.get_failures()
34 assert len(failures) == 0
35
36 with prog.artifacts[0].open("rb") as f:
37 assert f.read().rstrip() == b"attachment"
38
39
40def test_bad_file_ignored(tmpdir):

Callers

nothing calls this directly

Calls 6

BufferReporterClass · 0.90
get_unicode_builderFunction · 0.85
firstMethod · 0.80
get_failuresMethod · 0.80
buildMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected