File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,22 @@ class RoleContentFixture(t.NamedTuple):
48
48
expected_html : str
49
49
50
50
51
- def test_register_django_docutils_roles () -> None :
51
+ def test_register_django_docutils_roles (monkeypatch : pytest . MonkeyPatch ) -> None :
52
52
"""Assertions for register_django_docutils_roles()."""
53
+ from django_docutils .lib import roles as roles_package
54
+
55
+ assert roles_package .DJANGO_DOCUTILS_LIB_RST , ( # type:ignore[attr-defined]
56
+ "Sanity-check, something truthy should be set." ""
57
+ )
58
+ register_django_docutils_roles ()
59
+
60
+ monkeypatch .setattr (roles_package , "DJANGO_DOCUTILS_LIB_RST" , {})
61
+ register_django_docutils_roles ()
62
+
63
+ monkeypatch .setattr (roles_package , "DJANGO_DOCUTILS_LIB_RST" , {"other" : None })
64
+ register_django_docutils_roles ()
65
+
66
+ monkeypatch .setattr (roles_package , "DJANGO_DOCUTILS_LIB_RST" , {"roles" : {}})
53
67
register_django_docutils_roles ()
54
68
55
69
You can’t perform that action at this time.
0 commit comments