In 5c4bca6cb6 a new backend base class was introduced. However the check and its corresponding tests still reference the old base class, thus triggering a warning on setups using the new backend base class.
resolves#907
The [usage documentation](https://django-axes.readthedocs.io/en/latest/3_usage.html) advises to create subclass of `AxesBackend` to ignore the lack of `request` if necessary. I've done this in a project using `django-oauth-toolkit`, which doesn't pass `request` (though it should as per [this PR](https://github.com/jazzband/django-oauth-toolkit/pull/643)).
This meant that the axes.W003 check was being triggered, so I've fixed it to check for subclasses of `AxesBackend` as well as the class itself.
Checking with getattr(object, name, [default]) provides
false positivies for flags that have their value set to None.
Checking with try: getattr(object, name) always produces
correct check values if a flag is defined in project settings.
Default values for flags are defined in the Axes default settings
so this should not alter any existing behaviour.
- Use consistent alphabetical import ordering across files
- Use axes.conf.settings for internally loading settings
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>