File: test_abstract_models.py

package info (click to toggle)
python-django-imagekit 4.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 684 kB
  • sloc: python: 2,000; makefile: 133
file content (9 lines) | stat: -rw-r--r-- 385 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
from imagekit.utils import get_nonabstract_descendants
from nose.tools import eq_
from . models import (AbstractImageModel, ConcreteImageModel,
                      ConcreteImageModelSubclass)


def test_nonabstract_descendants_generator():
    descendants = list(get_nonabstract_descendants(AbstractImageModel))
    eq_(descendants, [ConcreteImageModel, ConcreteImageModelSubclass])