!C99Shell v. 2.6 Mod (06.03.2026)!

Software: Apache. PHP/7.2.34 

uname -a: Linux li456-155.members.linode.com 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01
UTC 2023 x86_64
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/usr/share/doc/python2-mock-1.0.1/   drwxr-xr-x
Free 1.63 GB of 47.23 GB (3.44%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Bind    Proc.    FTP brute    Sec.    SQL    PHP-code    Self remove    Logout    


Viewing file:     sentinel.txt (1.5 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
==========
 Sentinel
==========


.. currentmodule:: mock

.. testsetup::

    class ProductionClass(object):
        def something(self):
            return self.method()

    class Test(unittest2.TestCase):
        def testSomething(self):
            pass
    self = Test('testSomething')


.. data:: sentinel

    The ``sentinel`` object provides a convenient way of providing unique
    objects for your tests.

    Attributes are created on demand when you access them by name. Accessing
    the same attribute will always return the same object. The objects
    returned have a sensible repr so that test failure messages are readable.


.. data:: DEFAULT

    The `DEFAULT` object is a pre-created sentinel (actually
    `sentinel.DEFAULT`). It can be used by :attr:`~Mock.side_effect`
    functions to indicate that the normal return value should be used.


Sentinel Example
================

Sometimes when testing you need to test that a specific object is passed as an
argument to another method, or returned. It can be common to create named
sentinel objects to test this. `sentinel` provides a convenient way of
creating and testing the identity of objects like this.

In this example we monkey patch `method` to return
`sentinel.some_object`:

.. doctest::

    >>> real = ProductionClass()
    >>> real.method = Mock(name="method")
    >>> real.method.return_value = sentinel.some_object
    >>> result = real.method()
    >>> assert result is sentinel.some_object
    >>> sentinel.some_object
    sentinel.some_object



:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

c99shell Mod — c99shell.com © 2026
Generation time: 0.0508