#20700: Tests does not report missing fixtures -----------------------------------+-------------------- Reporter: vzima | Owner: nobody Type: Bug | Status: new Component: Testing framework | Version: 1.5 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------------+-------------------- If a test contains fixtures, which do not exists, it does not report it as as failure. This is serious problem as fixtures are part of the test and their absence may cause false-positive success.
Consider this example: {{{ #!python from django.test import TestCase class TestFoo(TestCase): fixtures = ('/invalid/filename', ) # Assume the fixture should load FooModel(pk=1) def test_foo_delete(self): delete_if_foo_exists(pk=1) self.assertFalse(FooModel.objects.filter(pk=1).exists()) }}} Such a test would pass even if the `delete_if_foo_exists` does nothing. This test is a very simple example, but ignoring the fact that fixtures are not loaded, can easily hide less obvious and more severe errors. Mere typo in fixture name can very well lead to a serious error. -- Ticket URL: <https://code.djangoproject.com/ticket/20700> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/048.9d4de3bfc9135b3401857c5ba0a354ed%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.