Skip to content

Loading…

DummyRequest uses wrong registry if it is created before testing.setUp is executed #165

Closed
mcdonc opened this Issue · 1 comment

1 participant

@mcdonc
Pylons Project member

testing.DummyRequest uses the wrong registry (the global registry) as self.registry if a dummy request is created before testing.setUp() is executed (setUp pushes a local registry onto the threadlocal stack). To fix: use a property for request.registry instead of an attribute.

@mcdonc
Pylons Project member
  • testing.DummyRequest used the wrong registry (the global registry) as self.registry if a dummy request was created before testing.setUp was executed (testing.setUp pushes a local registry onto the threadlocal stack). Fixed by implementing registry as a property for DummyRequest instead of eagerly assigning an attribute. See also #165

Closed by 8af47bc.

@mcdonc mcdonc closed this
@cguardia cguardia pushed a commit that referenced this issue
@mcdonc mcdonc - ``testing.DummyRequest`` used the wrong registry (the global regist…
…ry) as

  ``self.registry`` if a dummy request was created *before* ``testing.setUp``
  was executed (``testing.setUp`` pushes a local registry onto the
  threadlocal stack). Fixed by implementing ``registry`` as a property for
  DummyRequest instead of eagerly assigning an attribute.
  See also #165

Closes #165.
8af47bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.