Fix: whitespace.
This broke my Vim auto-folds.
This commit is contained in:
parent
67fcdca6d4
commit
4f3eacd72c
@ -523,29 +523,29 @@ class FieldTest(unittest.TestCase):
|
|||||||
Link.drop_collection()
|
Link.drop_collection()
|
||||||
Post.drop_collection()
|
Post.drop_collection()
|
||||||
Bookmark.drop_collection()
|
Bookmark.drop_collection()
|
||||||
|
|
||||||
link_1 = Link(title="Pitchfork")
|
link_1 = Link(title="Pitchfork")
|
||||||
link_1.save()
|
link_1.save()
|
||||||
|
|
||||||
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
|
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
|
||||||
post_1.save()
|
post_1.save()
|
||||||
|
|
||||||
bm = Bookmark(bookmark_object=post_1)
|
bm = Bookmark(bookmark_object=post_1)
|
||||||
bm.save()
|
bm.save()
|
||||||
|
|
||||||
bm = Bookmark.objects(bookmark_object=post_1).first()
|
bm = Bookmark.objects(bookmark_object=post_1).first()
|
||||||
|
|
||||||
self.assertEqual(bm.bookmark_object, post_1)
|
self.assertEqual(bm.bookmark_object, post_1)
|
||||||
self.assertTrue(isinstance(bm.bookmark_object, Post))
|
self.assertTrue(isinstance(bm.bookmark_object, Post))
|
||||||
|
|
||||||
bm.bookmark_object = link_1
|
bm.bookmark_object = link_1
|
||||||
bm.save()
|
bm.save()
|
||||||
|
|
||||||
bm = Bookmark.objects(bookmark_object=link_1).first()
|
bm = Bookmark.objects(bookmark_object=link_1).first()
|
||||||
|
|
||||||
self.assertEqual(bm.bookmark_object, link_1)
|
self.assertEqual(bm.bookmark_object, link_1)
|
||||||
self.assertTrue(isinstance(bm.bookmark_object, Link))
|
self.assertTrue(isinstance(bm.bookmark_object, Link))
|
||||||
|
|
||||||
Link.drop_collection()
|
Link.drop_collection()
|
||||||
Post.drop_collection()
|
Post.drop_collection()
|
||||||
Bookmark.drop_collection()
|
Bookmark.drop_collection()
|
||||||
@ -555,23 +555,23 @@ class FieldTest(unittest.TestCase):
|
|||||||
"""
|
"""
|
||||||
class Link(Document):
|
class Link(Document):
|
||||||
title = StringField()
|
title = StringField()
|
||||||
|
|
||||||
class Post(Document):
|
class Post(Document):
|
||||||
title = StringField()
|
title = StringField()
|
||||||
|
|
||||||
class User(Document):
|
class User(Document):
|
||||||
bookmarks = ListField(GenericReferenceField())
|
bookmarks = ListField(GenericReferenceField())
|
||||||
|
|
||||||
Link.drop_collection()
|
Link.drop_collection()
|
||||||
Post.drop_collection()
|
Post.drop_collection()
|
||||||
User.drop_collection()
|
User.drop_collection()
|
||||||
|
|
||||||
link_1 = Link(title="Pitchfork")
|
link_1 = Link(title="Pitchfork")
|
||||||
link_1.save()
|
link_1.save()
|
||||||
|
|
||||||
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
|
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
|
||||||
post_1.save()
|
post_1.save()
|
||||||
|
|
||||||
user = User(bookmarks=[post_1, link_1])
|
user = User(bookmarks=[post_1, link_1])
|
||||||
user.save()
|
user.save()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user