def test_get_file_fields(self): file_fields = get_file_fields() expect(file_fields).to_be_instance_of(list).to_length(3) for f in file_fields: expect(f).to_be_instance_of(models.FileField) file_fields_names = [f.name for f in file_fields] expect(file_fields_names)\ .to_include('file_field')\ .to_include('image_field')\ .to_include('custom_field') expect(file_fields_names).Not.to_include('char_field')