Ejemplo n.º 1
0
    def test_remove_section_01(self):
        items = {
            'раздел': {},
        }
        reg = Registry(items)
        result = reg.remove_section('раздел')

        self.assertTrue(result)
        self.assertFalse(reg.has_section('раздел'))
Ejemplo n.º 2
0
    def test_remove_section_01(self):
        items = {
            'раздел': {},
        }
        reg = Registry(items)
        result = reg.remove_section('раздел')

        self.assertTrue(result)
        self.assertFalse(reg.has_section('раздел'))
Ejemplo n.º 3
0
    def test_remove_section_02(self):
        items = {
            'раздел-1': {
                'раздел-2': {
                    'параметр': 100,
                }
            },
        }
        reg = Registry(items)
        result = reg.remove_section('раздел-1')

        self.assertTrue(result)
        self.assertFalse(reg.has_section('раздел-1'))
Ejemplo n.º 4
0
    def test_remove_section_02(self):
        items = {
            'раздел-1': {
                'раздел-2': {
                    'параметр': 100,
                }
            },
        }
        reg = Registry(items)
        result = reg.remove_section('раздел-1')

        self.assertTrue(result)
        self.assertFalse(reg.has_section('раздел-1'))
Ejemplo n.º 5
0
    def test_remove_section_error_01(self):
        items = {}
        reg = Registry(items)

        result = reg.remove_section('раздел')
        self.assertFalse(result)
Ejemplo n.º 6
0
    def test_remove_section_error_01(self):
        items = {}
        reg = Registry(items)

        result = reg.remove_section('раздел')
        self.assertFalse(result)