'Ensure that a boolean test of a FileField indicates its presence'

def test_file_boolean(self):

    class TestFile(Document, ):
        the_file = FileField()
    TestFile.drop_collection()
    test_file = TestFile()
    self.assertFalse(bool(test_file.the_file))
    test_file.the_file.put(six.b('Hello,    World!'), content_type='text/plain')
    test_file.save()
    self.assertTrue(bool(test_file.the_file))
    test_file = TestFile.objects.first()
    self.assertEqual(test_file.the_file.content_type, 'text/plain')
