'Tests that long fields are stored as long in mongo, even if long
value is small enough to be an int.'

def test_long_field_is_considered_as_int64(self):

    class TestLongFieldConsideredAsInt64(Document, ):
        some_long = LongField()
    doc = TestLongFieldConsideredAsInt64(some_long=42).save()
    db = get_db()
    self.assertTrue(isinstance(db.test_long_field_considered_as_int64.find()[0]['some_long'], Int64))
    self.assertTrue(isinstance(doc.some_long, six.integer_types))
