Skip to content

Commit

Permalink
[squashme] Rename ByteString to Blob
Browse files Browse the repository at this point in the history
  • Loading branch information
fernflower committed Aug 15, 2022
1 parent 8497613 commit cef331b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions leapp/models/fields/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ def _model_type(self):
return six.string_types + (six.binary_type,)


class ByteString(BuiltinField):
class Blob(BuiltinField):
"""
ByteString field
Blob field
"""
@property
def _model_type(self):
Expand Down
10 changes: 5 additions & 5 deletions tests/scripts/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ class WithNestedListModel(Model):
items = fields.List(fields.Model(BasicModel))


class WithByteStringModel(Model):
class WithBlobModel(Model):
topic = ModelTestTopic
message = fields.ByteString()
can_be_empty = fields.Nullable(fields.ByteString())
message = fields.Blob()
can_be_empty = fields.Nullable(fields.Blob())


class AllFieldTypesModel(Model):
Expand Down Expand Up @@ -81,8 +81,8 @@ def test_basic_model():


def test_bytestring_model():
m = WithByteStringModel(message=b'\xf3\xcf\xcf\xc2\xdd\xc5\xce\xc9\xc5')
m2 = WithByteStringModel.create(m.dump())
m = WithBlobModel(message=b'\xf3\xcf\xcf\xc2\xdd\xc5\xce\xc9\xc5')
m2 = WithBlobModel.create(m.dump())
assert m.message == m2.message


Expand Down

0 comments on commit cef331b

Please sign in to comment.