class documentation
class GlobalAppTests(SynchronousTestCase): (source)
Tests for the global app object
Method | test |
Undocumented |
Method | test |
Historically, the object named "klein.resource" has had two meanings: |
Historically, the object named "klein.resource" has had two meanings:
- One is "klein.* is sort of like a klein.Klein instance, so klein.resource() is sort of like klein.Klein.resource()".
- The other is "the public module in which klein.resource.KleinResource is defined".
This used to only work by accident; these meanings both sort of worked but only as long as you followed a certain import convention (from klein import resource for the former, from klein.resource import KleinResource for the latter). This test ensures that klein.resource is a special object, callable as you would expect from the former, but also having the attributes of the latter.