From 5f2a113cf824370ca4089ba02d4fbb3a0a31d6bf Mon Sep 17 00:00:00 2001 From: Dennis Burke Date: Mon, 4 Nov 2024 13:55:44 -0500 Subject: [PATCH] correct list usage in test --- tests/test_lists.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_lists.py b/tests/test_lists.py index bb7c1ce..6d7daf3 100644 --- a/tests/test_lists.py +++ b/tests/test_lists.py @@ -11,16 +11,16 @@ def test_lists(): def test_nested_list(): lst = List('ol', indent_level=1) - lst('li', 'test') + lst.add_item('li', 'test') s = List('ol', indent_level=2) s.add_item('li', 'another one') - lst('li', s) - result = lst() + lst.add_item('li', s) + result = lst.process() expect = '\t
    \n\t\t
  1. test\n\t\t
      \n\t\t\t
    1. another one
    2. \n\t\t
  2. \n\t
' assert result == expect lst = List('ol', indent_level=1) - lst('li', 'test') + lst.add_item('li', 'test') s1 = List('ol', indent_level=2) s1.add_item('li', 'another one') s2 = List('ul', indent_level=3) @@ -28,8 +28,8 @@ def test_nested_list(): s2.add_item('li', 'point two') s1.add_item('li', s2) s1.add_item('li', 'moar item') - lst('li', s1) - result = lst() + lst.add_item('li', s1) + result = lst.process() expect = '\t
    \n\t\t
  1. test\n\t\t
      \n\t\t\t
    1. another one\n\t\t\t
        \n\t\t\t\t
      • point one
      • \n\t\t\t\t
      • point two
      • \n\t\t\t
    2. \n\t\t\t
    3. moar item
    4. \n\t\t
  2. \n\t
' assert result == expect