Refactor tests regarding required attributes

Some tests regarding the _required_attribute(s) functions in the wsgi
module seemed to be somewhat confusing, so I refactored them trying to
increase readability.

Change-Id: Id9aedcb05063cf0d618399847f6afe73c800aa93
Merge "Refactor tests regarding required attributes"