'Tests the delete method of a List of Embedded Documents
after the filter method has been called.'

def test_filtered_delete(self):

    comment = self.post1.comments[1]
    number = self.post1.comments.filter(author='user2').delete()
    self.post1.save()
    self.assertNotIn(comment, self.BlogPost.objects(id=self.post1.id)[0].comments)
    self.assertEqual(len(self.BlogPost.objects(id=self.post1.id)[0].comments), 1)
    self.assertNotIn(comment, self.post1.comments)
    self.assertEqual(len(self.post1.comments), 1)
    self.assertEqual(number, 1)
