File: test_to_bool.py

package info (click to toggle)
python-gvm 26.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,220 kB
  • sloc: python: 45,844; makefile: 18
file content (21 lines) | stat: -rw-r--r-- 395 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
# SPDX-FileCopyrightText: 2021-2024 Greenbone AG
#
# SPDX-License-Identifier: GPL-3.0-or-later
#

import unittest

from gvm.utils import to_bool


class TestToBool(unittest.TestCase):
    def test_to_bool(self):
        true = to_bool(True)
        self.assertEqual("1", true)

        false = to_bool(False)
        self.assertEqual("0", false)


if __name__ == "__main__":
    unittest.main()