Skip to content

Commit

Permalink
Remvoe django-polymorphic tests
Browse files Browse the repository at this point in the history
Now that we are not overriding .iterator() custom querysets with their
iterator() is not an issue anymore.
  • Loading branch information
Suor committed May 9, 2017
1 parent d5c8990 commit 3d060be
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 29 deletions.
1 change: 0 additions & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ redis>=2.9.1
funcy>=1.2,<2.0
six>=1.4.0
before_after==1.0.0
django-polymorphic>=1.0.2
15 changes: 0 additions & 15 deletions tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,3 @@ def set_boolean_true(sender, instance, created, **kwargs):

from django.db.models.signals import post_save
post_save.connect(set_boolean_true, sender=One)


try:
from polymorphic.models import PolymorphicModel

class PolymorphicA(PolymorphicModel):
pass

class PolymorphicB(PolymorphicA):
pass

class PolymorphicZ(models.Model):
a = models.ForeignKey(PolymorphicA)
except:
PolymorphicModel = None
2 changes: 0 additions & 2 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@
'tests.noncachedvideoproxy': None,
'tests.noncachedmedia': None,
'auth.*': {},
'tests.polymorphica': {'ops': 'all', 'timeout': 60 * 15},
'tests.polymorphicb': {'ops': 'all', 'timeout': 60 * 15},
}

CACHEOPS_LRU = bool(os.environ.get('CACHEOPS_LRU'))
Expand Down
10 changes: 0 additions & 10 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,16 +925,6 @@ def _target():
self.assertEqual(results[0], results[1])


# TODO: remove this test when .iterator() is dropped
@unittest.skipIf(PolymorphicModel is None, "django-polumorphic doesn't work with Django 2.0")
class PolymorphicTests(BaseTestCase):
def test_polymorphic(self):
b = PolymorphicB.objects.create()
z = PolymorphicZ.objects.create(a=b)
z2 = PolymorphicZ.objects.get(id=z.id)
self.assertEqual(type(z2.a), PolymorphicB)


# Utilities

def _make_inc(deco=lambda x: x):
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ deps =
py{27,33,34,35,36}: psycopg2
pypy: psycopg2cffi
before_after==1.0.0
django-polymorphic>=1.0.2
commands =
./run_tests.py []
env CACHEOPS_LRU=1 ./run_tests.py []
Expand Down

0 comments on commit 3d060be

Please sign in to comment.