File: test_to_base64.py

package info (click to toggle)
python-gvm 26.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,308 kB
  • sloc: python: 46,738; makefile: 18
file content (21 lines) | stat: -rw-r--r-- 414 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_base64


class TestToBase64(unittest.TestCase):
    def test_to_base64(self):
        foo64 = to_base64("foo")
        self.assertEqual("Zm9v", foo64)

        bar64 = to_base64("bar")
        self.assertEqual("YmFy", bar64)


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