Fix wrongly mandatory fields for modulemd_defaults #87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If you look at the schema defined in Pulp, 'stream' and 'profiles' are
not actually mandatory (not part of the unit key).
Although I believe in practice they're expected to be defined for all
real data, the fact that they're not part of the unit key means they're
omitted from responses in some contexts (e.g. units_succcessful in
associate/unassociate calls), therefore they must not be mandatory here
or crashes will occur when handling those responses.
Declaration of 'profiles' was also tweaked for consistency with other
fields: in other classes, a value which is allowed to be None still has
a type declared (as all types are understood to be nullable), so the
fact that this field can be None is not a reason to omit a type here
either.
One test was tweaked to ensure no crashes when stream is missing.
Relates to RHELDST-861.