'Ensure that invalid values cannot be assigned to long fields.'

def test_long_validation(self):

    class TestDocument(Document, ):
        value = LongField(min_value=0, max_value=110)
    doc = TestDocument()
    doc.value = 50
    doc.validate()
    doc.value = (-1)
    self.assertRaises(ValidationError, doc.validate)
    doc.age = 120
    self.assertRaises(ValidationError, doc.validate)
    doc.age = 'ten'
    self.assertRaises(ValidationError, doc.validate)
