!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/lib/python2.7/dist-packages/twisted/scripts/test/   drwxr-xr-x
Free 9.56 GB of 29.4 GB (32.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_tap2deb.py (3.47 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

"""
Tests for L{twisted.scripts.tap2deb}.
"""

import warnings

from twisted.python import usage, procutils
from twisted.python.filepath import FilePath

from twisted.trial.unittest import TestCase, SkipTest

with warnings.catch_warnings():
    warnings.simplefilter("ignore", category=DeprecationWarning)
    from twisted.scripts import tap2deb


class TestTap2DEB(TestCase):
    """
    Tests for the L{tap2deb} script.
    """
    maintainer = "Jane Doe <janedoe@example.com>"

    def test_maintainerOption(self):
        """
        The C{--maintainer} option must be specified on the commandline or
        passed to L{tap2deb.run}.
        """
        config = tap2deb.MyOptions()
        self.assertRaises(usage.UsageError, config.parseOptions, [])
        self.assertRaises(SystemExit, tap2deb.run, [])


    def test_optionDefaults(self):
        """
        Commandline options default to sensible values.
        """
        config = tap2deb.MyOptions()
        config.parseOptions(['--maintainer', self.maintainer])

        self.assertEqual(config['tapfile'], 'twistd.tap')
        self.assertEqual(config['maintainer'], self.maintainer)
        self.assertEqual(config['protocol'], '')
        self.assertEqual(config['description'], '')
        self.assertEqual(config['long_description'], '')
        self.assertEqual(config['set-version'], '1.0')
        self.assertEqual(config['debfile'], None)
        self.assertEqual(config['type'], 'tap')


    def test_missingMaintainer(self):
        """
        Omitting the maintainer argument results in L{tap2deb.run} raising
        C{SystemExit}.
        """
        error = self.assertRaises(SystemExit, tap2deb.run,
            ["--tapfile", "foo"])
        self.assertTrue(str(error).endswith('maintainer must be specified.'))


    def test_basicOperation(self):
        """
        Running the L{tap2deb} script produces a bunch of files using
        C{dpkg-buildpackage}.
        """
        # Skip tests if dpkg-buildpackage is not present
        if not procutils.which("dpkg-buildpackage"):
            raise SkipTest("dpkg-buildpackage must be present to test tap2deb")

        baseDir = FilePath(self.mktemp())
        baseDir.makedirs()

        # Make a temporary .tap file
        version = '1.0'
        tapName = 'lemon'
        tapFile = baseDir.child("%s.tap" % (tapName,))
        tapFile.setContent("# Dummy .tap file")

        buildDir = FilePath('.build')
        outputDir = buildDir.child('twisted-%s-%s' % (tapName, version))

        # Run
        args = ["--tapfile", tapFile.path, "--maintainer", self.maintainer]
        tap2deb.run(args)

        # Verify input files were created
        self.assertEqual(sorted(outputDir.listdir()),
            ['build-stamp', 'debian', 'install-stamp', 'lemon.tap'])

        debianDir = outputDir.child('debian')
        for name in ['README.Debian', 'conffiles', 'default', 'init.d',
                     'postinst', 'prerm', 'postrm', 'changelog', 'control',
                     'copyright', 'dirs', 'rules']:
            self.assertTrue(debianDir.child(name).exists())

        # Verify 4 output files were created
        self.assertTrue(buildDir.child('twisted-lemon_1.0_all.deb').exists())
        self.assertTrue(buildDir.child('twisted-lemon_1.0.tar.gz').exists())
        self.assertTrue(buildDir.child('twisted-lemon_1.0.dsc').exists())
        self.assertEqual(
            len(buildDir.globChildren('twisted-lemon_1.0_*.changes')), 1)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0041 ]--