class documentation

Tests for the global app object

Method test_global_app Undocumented
Method test_weird_resource_situation Historically, the object named "klein.resource" has had two meanings:
def test_global_app(self): (source)

Undocumented

def test_weird_resource_situation(self): (source)

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.