'Ensure that each instance of a FileField is unique'

def test_file_uniqueness(self):

    class TestFile(Document, ):
        name = StringField()
        the_file = FileField()
    test_file = TestFile()
    test_file.name = 'Hello,    World!'
    test_file.the_file.put(six.b('Hello,    World!'))
    test_file.save()
    test_file_dupe = TestFile()
    data = test_file_dupe.the_file.read()
    self.assertTrue((test_file.name != test_file_dupe.name))
    self.assertTrue((test_file.the_file.read() != data))
    TestFile.drop_collection()
