Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mcdonc opened this issue Apr 6, 2011 · 1 comment

Comments

@mcdonc
Copy link
Member

mcdonc commented Apr 6, 2011

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
Copy link
Member Author

mcdonc commented Apr 6, 2011

Closed by 8af47bc.

@mcdonc mcdonc closed this as completed Apr 6, 2011
cguardia pushed a commit that referenced this issue Apr 17, 2011
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant