File: clienttests.py

package info (click to toggle)
booth 1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 852 kB
  • sloc: ansic: 7,181; sh: 2,166; python: 471; makefile: 280; xml: 7
file content (20 lines) | stat: -rw-r--r-- 836 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import string

from clientenv import ClientTestEnvironment

class ClientConfigTests(ClientTestEnvironment):
    mode = 'client'

    def test_site_buffer_overflow(self):
        # https://bugzilla.novell.com/show_bug.cgi?id=750256
        longfile = (string.ascii_lowercase * 3)[:63]
        expected_error = "'%s' exceeds maximum site name length" % longfile
        args = [ 'grant', '-s', longfile, '-t', 'ticket' ]
        self._test_buffer_overflow(expected_error, args=args)

    def test_ticket_buffer_overflow(self):
        # https://bugzilla.novell.com/show_bug.cgi?id=750256
        longfile = (string.ascii_lowercase * 3)[:63]
        expected_error = "'%s' exceeds maximum ticket name length" % longfile
        args = [ 'grant', '-s', 'site', '-t', longfile ]
        self._test_buffer_overflow(expected_error, args=args)