File: test_protocol.py

package info (click to toggle)
ospd-openvas 22.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,648 kB
  • sloc: python: 14,197; xml: 1,913; makefile: 45; sh: 29
file content (16 lines) | stat: -rw-r--r-- 452 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: 2014-2023 Greenbone AG
#
# SPDX-License-Identifier: AGPL-3.0-or-later

import unittest

from ospd.protocol import RequestParser


class RequestParserTestCase(unittest.TestCase):
    def test_parse(self):
        parser = RequestParser()
        self.assertFalse(parser.has_ended(b'<foo><bar>'))
        self.assertFalse(parser.has_ended(b'</bar>'))
        self.assertTrue(parser.has_ended(b'</foo>'))