'Ensure that capped collections defaults work properly.'

def test_capped_collection_default(self):

    class Log(Document, ):
        date = DateTimeField(default=datetime.now)
        meta = {'max_documents': 10}
    Log.drop_collection()
    Log().save()
    options = Log.objects._collection.options()
    self.assertEqual(options['capped'], True)
    self.assertEqual(options['max'], 10)
    self.assertEqual(options['size'], (10 * (2 ** 20)))
    class Log(Document, ):
        date = DateTimeField(default=datetime.now)
        meta = {'max_documents': 10}
    Log.objects
