File: test_section.py

package info (click to toggle)
python-sphinx-chango 0.5.0-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,776 kB
  • sloc: python: 4,909; javascript: 74; makefile: 23
file content (24 lines) | stat: -rw-r--r-- 863 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#  SPDX-FileCopyrightText: 2024-present Hinrich Mahler <chango@mahlerhome.de>
#
#  SPDX-License-Identifier: MIT
from chango.concrete.sections import Section


class TestSection:
    def test_init_required_args(self):
        section = Section(uid="uid1", title="Title 1")
        assert section.uid == "uid1"
        assert section.title == "Title 1"
        assert section.is_required is False
        assert section.render_pr_details is True
        assert section.sort_order == 0

    def test_init_all_args(self):
        section = Section(
            uid="uid2", title="Title 2", is_required=True, render_pr_details=False, sort_order=1
        )
        assert section.uid == "uid2"
        assert section.title == "Title 2"
        assert section.is_required is True
        assert section.render_pr_details is False
        assert section.sort_order == 1