def METHOD_NAME(self):
    err = "Object type String, should be FileData"
    file1 = FileData('file1', 'path/to/file1')
    self.layer.add_file(file1)
    self.assertEqual(len(self.layer.files), 1)
    with self.assertRaises(TypeError, msg=err):
        self.layer.add_file("afile")