3838)
3939from ultimate_notion .core import NotionObject
4040from ultimate_notion .obj_api .core import GenericObject
41- from ultimate_notion .obj_api .enums import CodeLang , Color
41+ from ultimate_notion .obj_api .enums import BGColor , CodeLang
4242from ultimate_notion .rich_text import text
4343
4444
@@ -741,18 +741,18 @@ def test_bullet_list_with_inline_formatting(
741741
742742
743743@pytest .mark .parametrize (
744- argnames = ("admonition_type" , "emoji" , "color " , "message" ),
744+ argnames = ("admonition_type" , "emoji" , "background_color " , "message" ),
745745 argvalues = [
746- ("note" , "π" , Color .BLUE , "This is an important note." ),
747- ("warning" , "β οΈ" , Color .YELLOW , "This is a warning message." ),
748- ("tip" , "π‘" , Color .GREEN , "This is a helpful tip." ),
746+ ("note" , "π" , BGColor .BLUE , "This is an important note." ),
747+ ("warning" , "β οΈ" , BGColor .YELLOW , "This is a warning message." ),
748+ ("tip" , "π‘" , BGColor .GREEN , "This is a helpful tip." ),
749749 ],
750750)
751751def test_admonition_single_line (
752752 * ,
753753 admonition_type : str ,
754754 emoji : str ,
755- color : Color ,
755+ background_color : BGColor ,
756756 message : str ,
757757 make_app : Callable [..., SphinxTestApp ],
758758 tmp_path : Path ,
@@ -771,7 +771,7 @@ def test_admonition_single_line(
771771 callout = UnoCallout (
772772 text = message ,
773773 icon = Emoji (emoji = emoji ),
774- color = color ,
774+ color = background_color ,
775775 )
776776
777777 expected_objects : list [NotionObject [Any ]] = [
@@ -788,17 +788,17 @@ def test_admonition_single_line(
788788
789789
790790@pytest .mark .parametrize (
791- argnames = ("admonition_type" , "emoji" , "color " ),
791+ argnames = ("admonition_type" , "emoji" , "background_color " ),
792792 argvalues = [
793- ("note" , "π" , Color .BLUE ),
794- ("warning" , "β οΈ" , Color .YELLOW ),
795- ("tip" , "π‘" , Color .GREEN ),
793+ ("note" , "π" , BGColor .BLUE ),
794+ ("warning" , "β οΈ" , BGColor .YELLOW ),
795+ ("tip" , "π‘" , BGColor .GREEN ),
796796 ],
797797)
798798def test_admonition_multiline (
799799 admonition_type : str ,
800800 emoji : str ,
801- color : Color ,
801+ background_color : BGColor ,
802802 make_app : Callable [..., SphinxTestApp ],
803803 tmp_path : Path ,
804804) -> None :
@@ -813,7 +813,11 @@ def test_admonition_multiline(
813813
814814 This is the second paragraph that should be nested.
815815 """
816- callout = UnoCallout (text = "" , icon = Emoji (emoji = emoji ), color = color )
816+ callout = UnoCallout (
817+ text = "" ,
818+ icon = Emoji (emoji = emoji ),
819+ color = background_color ,
820+ )
817821 callout .rich_text = text (
818822 text = f"This is the first paragraph of the { admonition_type } ."
819823 )
@@ -854,7 +858,7 @@ def hello():
854858 The code above demonstrates a simple function.
855859 """
856860
857- callout = UnoCallout (text = "" , icon = Emoji (emoji = "π" ), color = Color .BLUE )
861+ callout = UnoCallout (text = "" , icon = Emoji (emoji = "π" ), color = BGColor .BLUE )
858862 callout .rich_text = text (text = "This note contains a code example." )
859863
860864 nested_code_block = _create_code_block_without_annotations (
@@ -898,7 +902,7 @@ def hello():
898902 This paragraph comes after the code block.
899903 """
900904
901- callout = UnoCallout (text = "" , icon = Emoji (emoji = "π" ), color = Color .BLUE )
905+ callout = UnoCallout (text = "" , icon = Emoji (emoji = "π" ), color = BGColor .BLUE )
902906 callout .rich_text = text (text = "" )
903907
904908 nested_code_block = _create_code_block_without_annotations (
@@ -938,7 +942,7 @@ def test_admonition_with_bullet_points(
938942 * B
939943 """
940944
941- callout = UnoCallout (text = "" , icon = Emoji (emoji = "π" ), color = Color .BLUE )
945+ callout = UnoCallout (text = "" , icon = Emoji (emoji = "π" ), color = BGColor .BLUE )
942946 callout .rich_text = text (
943947 text = "This is an important note that demonstrates the note "
944948 "admonition\n support."
0 commit comments