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

Inject user to middleware tests #5203

Merged
merged 2 commits into from
Jan 31, 2019

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Jan 30, 2019

We don't use the full middleware cycle,
so we don't have a request.user.

This fixes the tests failing in the corporate site

We don't use the full middleware cycle,
so we don't have a `request.user`.

This fixes the tests failing in the corporate site
res = self.middleware.process_request(request)
self.assertEqual(res.status_code, 400)

@override_settings(PRODUCTION_DOMAIN='readthedocs.org')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was failing bc we override production_domain to readthedocs.com

@stsewd stsewd requested a review from a team January 30, 2019 23:56
@agjohnson agjohnson merged commit 3f31cbb into readthedocs:master Jan 31, 2019
@stsewd stsewd deleted the inject-user-to-middleware-tests branch January 31, 2019 01:42
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

Successfully merging this pull request may close these issues.

2 participants