Issue #46 on hold

Fix Exception-catching regarding <class TypeError> in modeltests.get_or_create

Nate Margono
created an issue

{{{

!python


File "/home/nm/django-dev/django-3k/build/tests/modeltests/get_or_create/models.py", line ?, in modeltests.get_or_create.models.test.API_TESTS Failed example: try: p, created = Person.objects.get_or_create(first_name='Tom', last_name='Smith') except Exception as e: if isinstance(e, IntegrityError): print("Pass") else: print("Fail with %s" % type(e)) Expected: Pass Got: Fail with <class 'TypeError'>


File "/home/nm/django-dev/django-3k/build/tests/modeltests/get_or_create/models.py", line ?, in modeltests.get_or_create.models.test.API_TESTS Failed example: try: m, created = ManualPrimaryKeyTest.objects.get_or_create(id=1, data='Different') except Exception as e: if isinstance(e, IntegrityError): print("Pass") else: print("Fail with %s" % type(e)) Expected: Pass Got: Fail with <class 'TypeError'>


}}}

Comments (1)

  1. Log in to comment