MCPcopy
hub / github.com/mkdocs/mkdocs / test_mm_meta_data

Method test_mm_meta_data

mkdocs/tests/utils/utils_tests.py:364–388  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

362 os.chmod(src, stat.S_IRUSR | stat.S_IWUSR)
363
364 def test_mm_meta_data(self):
365 doc = dedent(
366 """
367 Title: Foo Bar
368 Date: 2018-07-10
369 Summary: Line one
370 Line two
371 Tags: foo
372 Tags: bar
373
374 Doc body
375 """
376 )
377 self.assertEqual(
378 meta.get_data(doc),
379 (
380 "Doc body",
381 {
382 'title': 'Foo Bar',
383 'date': '2018-07-10',
384 'summary': 'Line one Line two',
385 'tags': 'foo bar',
386 },
387 ),
388 )
389
390 def test_mm_meta_data_blank_first_line(self):
391 doc = '\nfoo: bar\nDoc body'

Callers

nothing calls this directly

Calls 1

dedentFunction · 0.90

Tested by

no test coverage detected