Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
sHermanGriffiths committed Aug 26, 2024
1 parent e794322 commit 0a23d6d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_linkedheaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@
These tests verify how the n2y block classes convert notion data into Pandoc
abstract syntax tree (AST) objects, and then into markdown.
"""
from pandoc.types import Str, Space, Header, Link

from n2y.utils import strip_hyphens
from pandoc.types import Header, Link, Space, Str

from n2y.notion_mocks import mock_block, mock_rich_text
from n2y.utils import header_id_from_text, strip_hyphens
from tests.test_blocks import process_block

linked_headers = ["n2y.plugins.linkedheaders"]


def mock_header_ast(level, suffix, notion_block):
rich_text = notion_block[notion_block["type"]]["rich_text"][0]["plain_text"]
section_id = header_id_from_text(rich_text)
return Header(
level,
("", [], []),
(section_id, [], []),
[
Link(
("", [], []),
Expand Down

0 comments on commit 0a23d6d

Please sign in to comment.