class KleinTestCase(unittest.TestCase): (source)
Undocumented
Method | test |
bindable is a decorator which allows a function decorated by @route to have a uniform signature regardless of whether it is receiving a bound object from its Klein or not. |
Method | test_bind |
Klein.__get__ doesn't propagate AttributeError when searching for the bound Klein instance. |
Method | test_branch |
Klein.route should create a branch path which consumes all children, when the branch keyword argument is True and there is no trailing / on the path. |
Method | test_branch |
Klein.route should create a branch path which consumes all children when the branch keyword argument is True. |
Method | test_classical |
Klein.route may be used a method decorator when a Klein instance is defined as a class variable. |
Method | test_classical |
Multiple instances of a class with a Klein attribute and Klein.route 'd methods can be created and their Klein s used independently. |
Method | test_classical |
Multiple instances of a class with a Klein attribute and Klein.route 'd methods can be created and their Klein s used independently. |
Method | test_klein |
When the Klein object can't find itself on the class it still preserves identity. |
Method | test_map |
Routes are routed to the proper object regardless of its __hash__ implementation. |
Method | test |
modified is a decorator which alters the thing that it decorates, and describes itself as such. |
Method | test_preserve |
Repeated accesses of the same Klein attribute on the same instance should result in an identically bound instance, when possible. "Possible" is defined by a writable instance-level attribute named __klein_bound_<the name of the Klein attribute on the class>__... |
Method | test |
Klien.resource returns a KleinResource . |
Method | test |
Klein.route adds functions as routable endpoints. |
Method | test |
Klein.run configures a KleinResource and a Site listening on the specified interface and port, and logs to stdout. |
Method | test_run |
Klein.run called with SSL endpoint specification. |
Method | test_run |
Klein.run called with tcp6 endpoint description. |
Method | test_run |
Klein.run logs to the specified logFile. |
Method | test_stacked |
Klein.route can be stacked to create multiple endpoints of a single function. |
Method | test_submounted |
Klein.subroute adds functions as routable endpoints. |
Method | test_url |
Klein.urlFor builds an URL for an endpoint with parameters |
Klein.route
should create a branch path which consumes all children, when the branch keyword argument is True and there is no trailing / on the path.
Klein.route
should create a branch path which consumes all children when the branch keyword argument is True.
Multiple instances of a class with a Klein
attribute and Klein.route
'd methods can be created and their Klein
s used independently.
Multiple instances of a class with a Klein
attribute and Klein.route
'd methods can be created and their Klein
s used independently.
Repeated accesses of the same Klein
attribute on the same instance should result in an identically bound instance, when possible. "Possible" is defined by a writable instance-level attribute named __klein_bound_<the name of the Klein attribute on the class>__, and something is maintaining a strong reference to the Klein
instance.
@patch(
@patch(
@patch(
def test_run(self, reactor, mock_log, mock_site, mock_kr): (source)
Klein.run
configures a KleinResource
and a Site
listening on the specified interface and port, and logs to stdout.
@patch(
@patch(
@patch(
def test_runSSL(self, reactor, mock_sfs, mock_log, mock_kr): (source)
Klein.run
called with SSL endpoint specification.
@patch(
@patch(
@patch(
def test_runTCP6(self, reactor, mock_sfs, mock_log, mock_kr): (source)
Klein.run
called with tcp6 endpoint description.
@patch(
@patch(
@patch(
def test_runWithLogFile(self, reactor, mock_log, mock_site, mock_kr): (source)
Klein.run
logs to the specified logFile.