(self)
| 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' |