'Ensure that $set and $unset actions are performed in the
same operation.'

def test_set_unset_one_operation(self):

    class FooBar(Document, ):
        foo = StringField(default=None)
        bar = StringField(default=None)
    FooBar.drop_collection()
    foo = FooBar(foo='foo').save()
    self.assertEqual(foo.foo, 'foo')
    del foo.foo
    foo.bar = 'bar'
    with query_counter() as q:
        self.assertEqual(0, q)
        foo.save()
        self.assertEqual(1, q)
