Skip to content

Commit

Permalink
Test Document inherits from EmbeddedDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Jul 20, 2020
1 parent ebdaae6 commit a07c363
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,18 @@ class Meta:
assert DocChild1Child.opts.collection_name is 'col1'
assert DocChild2.opts.collection_name == 'col2'

def test_inheritance_from_embedded_document(self):

@self.instance.register
class Parent(EmbeddedDocument):
last_name = fields.StrField()

@self.instance.register
class Child(Parent):
first_name = fields.StrField()

Child(first_name='John', last_name='Doe')

def test_marshmallow_tags_build(self):

@self.instance.register
Expand Down

0 comments on commit a07c363

Please sign in to comment.