Repository: django-import-export/django-import-export

Issue:
Branch release-3-x error when upgrading
**Describe the bug**
Got this when trying to import after upgrading to the `release-3-x` branch
```
   ...venv/src/django-import-export/import_export/mixins.py", line 20, in check_resource_classes
   raise Exception("The resource_classes field type must be subscriptable (list, tuple, ...)")
```

**To Reproduce**
Steps to reproduce the behavior:
1. Upgrade to release-3-x from 2.5.0



Discussion:
Hi Manel

I expect that you have declared the new `resource_classes` attribute, but set it to be a class name, not a list.

For example, this will raise the error:

```python
resource_classes = BookResource
```

It should be:

```python
resource_classes = [BookResource]
```

Note that if you stick with the original declaration:

```python
resource_class = BookResource
```

Then you will see a deprecation warning:

```
DeprecationWarning: The 'resource_class' field has been deprecated. Please implement the new 'resource_classes' field
```

The steps to upgrade are described in the [changelog](https://github.com/django-import-export/django-import-export/blob/e7b6318b97c1ac634f4f191ca111db47cb2f83f7/docs/changelog.rst).

> The *Mixin.resource_class accepting single resource has been deprecated (will work for few next versions) and the new *Mixin.resource_classes accepting subscriptable type (list, tuple, ...) has been added.

Lmk if you are still getting this issue (there might be something else going on).
Hi @matthewhegarty, that's the thing, I updated to the 3.x without touching anything, so it should keep working.

I just checked, this is what I have:
```python
class XXXAdmin(ImportMixin, admin.ModelAdmin):

    # resource_class = XXXResource

    def get_resource_class(self):
        return client_resources.XXXResource
```

Maybe we didn't account for this case?

there is a check for [this case](https://github.com/django-import-export/django-import-export/blob/release-3-x/import_export/mixins.py#L26), and the deprecation warning is logged,  but it doesn't prevent the exception from being thrown, so this is a valid bug.

Looping in @PetrDlouhy 

Resolving patch:
diff --git a/import_export/mixins.py b/import_export/mixins.py
--- a/import_export/mixins.py
+++ b/import_export/mixins.py
@@ -29,7 +29,7 @@ def get_resource_classes(self):
                 "Please implement the new 'get_resource_classes()' method",
                 DeprecationWarning,
             )
-            return self.get_resource_class()
+            return [self.get_resource_class()]
         if self.resource_class:
             warnings.warn(
                 "The 'resource_class' field has been deprecated. "


Test patch:
diff --git a/tests/core/tests/test_mixins.py b/tests/core/tests/test_mixins.py
--- a/tests/core/tests/test_mixins.py
+++ b/tests/core/tests/test_mixins.py
@@ -260,6 +260,29 @@ def test_choose_import_resource_class(self, form):
         form.cleaned_data = {'resource': 1}
         self.assertEqual(admin.choose_import_resource_class(form), FooResource)
 
+    class BaseModelResourceClassOldTest(mixins.BaseImportMixin, mixins.BaseExportMixin):
+
+        def get_resource_class(self):
+            return FooResource
+
+    def test_get_resource_class_old(self):
+        """
+        Test that if only the old get_resource_class() method is defined,
+        the get_export_resource_classes() and get_import_resource_classes()
+        still return list of resources.
+        """
+        admin = self.BaseModelResourceClassOldTest()
+        with self.assertWarnsRegex(
+                DeprecationWarning,
+                r"^The 'get_resource_class\(\)' method has been deprecated. "
+                r"Please implement the new 'get_resource_classes\(\)' method$"):
+            self.assertEqual(admin.get_export_resource_classes(), [FooResource])
+        with self.assertWarnsRegex(
+                DeprecationWarning,
+                r"^The 'get_resource_class\(\)' method has been deprecated. "
+                r"Please implement the new 'get_resource_classes\(\)' method$"):
+            self.assertEqual(admin.get_import_resource_classes(), [FooResource])
+
 
 class BaseExportMixinTest(TestCase):
     class TestBaseExportMixin(mixins.BaseExportMixin):