Skip to content

Commit

Permalink
Removing Actually from class names
Browse files Browse the repository at this point in the history
  • Loading branch information
alidscott committed Aug 11, 2020
1 parent d027110 commit 47d8b4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions flask_rebar/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _deserialize(self, value, attr, data):
return super(QueryParamList, self)._deserialize(items, attr, data)


class ActuallyRequireOnDumpMixin(object):
class RequireOnDumpMixin(object):
"""
By default, Marshmallow only raises an error when required fields are missing
when `marshmallow.Schema.load` is called.
Expand Down Expand Up @@ -115,7 +115,7 @@ def disallow_extra_fields(self, processed_data, original_data):
RequestSchema = Schema


class ResponseSchema(ActuallyRequireOnDumpMixin, Schema):
class ResponseSchema(RequireOnDumpMixin, Schema):
pass


Expand Down
6 changes: 3 additions & 3 deletions tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from flask_rebar import messages
from flask_rebar.utils.request_utils import normalize_schema
from tests.helpers import skip_if_marshmallow_not_v2
from flask_rebar.validation import ActuallyRequireOnDumpMixin
from flask_rebar.validation import RequireOnDumpMixin
from flask_rebar.validation import CommaSeparatedList
from flask_rebar.validation import DisallowExtraFieldsMixin
from flask_rebar.validation import QueryParamList
Expand Down Expand Up @@ -60,7 +60,7 @@ def test_doesnt_break_for_non_object_schema(self):
self.assertFalse(data)


class ActuallyRequireOnDumpMixinSchema(Schema, ActuallyRequireOnDumpMixin):
class RequireOnDumpMixinSchema(Schema, RequireOnDumpMixin):
optional = fields.Str()
value_optional = fields.Str(required=True, allow_none=True)
value_required = fields.Str(required=True, allow_none=False)
Expand All @@ -71,7 +71,7 @@ class ActuallyRequireOnDumpMixinSchema(Schema, ActuallyRequireOnDumpMixin):
class RequireOutputMixinTest(TestCase):
def setUp(self):
super(RequireOutputMixinTest, self).setUp()
self.schema = normalize_schema(ActuallyRequireOnDumpMixinSchema)
self.schema = normalize_schema(RequireOnDumpMixinSchema)
self.data = {
"value_required": "abc",
"value_optional": None,
Expand Down

0 comments on commit 47d8b4e

Please sign in to comment.