use real webob.Request objects in server-core tests

RESOLVED FIXED

Status

Cloud Services
Server: Core
--
enhancement
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: rfkelly, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
Created attachment 565100 [details] [diff] [review]
patch to use real webob.Request objects in tests

Currently the server-core testcases use a variety of fake Request objects.  This can cause tests to break if internal code starts using methods on the real webob.Request class that aren't provided by the fake.

(e.g. in a new auth handler I want to use request.get_response() to delegate to a repoze.who WSGI app)

Attached patch provides a shortcut for creating a real webob.Request object, and updates the tests to use it.
Attachment #565100 - Flags: review?(telliott)
(Reporter)

Comment 1

6 years ago
Created attachment 565104 [details] [diff] [review]
updated patch to use real webob.Request objects in tests

Simplifying test_controllers.py to just pass in the environ that it needs
Attachment #565100 - Attachment is obsolete: true
Attachment #565100 - Flags: review?(telliott)
Attachment #565104 - Flags: review?(telliott)
Attachment #565104 - Flags: review?(telliott) → review+
(Reporter)

Comment 2

6 years ago
Committed in http://hg.mozilla.org/services/server-core/rev/5fe4fc1c3e4a
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.