Changes between Initial Version and Version 1 of Ticket #30359


Ignore:
Timestamp:
Apr 12, 2019, 7:55:22 AM (6 years ago)
Author:
Tim Graham
Comment:

The test doesn't pass with that change. ContentType.objects.get_for_model() defaults to for_concrete_model=True so the behavior looks correct.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30359

    • Property Component Uncategorizedcontrib.contenttypes
    • Property Resolutioninvalid
    • Property Status newclosed
  • Ticket #30359 – Description

    initial v1  
    11While experimenting with a CodeSonar plugin we develop, we noticed a potential bug in file "django/tests/contenttypes_tests/test_models.py" line 128 function test_get_for_concrete_model.
    2 
     2{{{
    33self.assertEqual(concrete_model_ct, ContentType.objects.get_for_model(DeferredProxyModel)) <<<<<<HERE
    44self.assertEqual(
    55            proxy_model_ct,
    66            ContentType.objects.get_for_model(DeferredProxyModel, for_concrete_model=False)
    7 
     7}}}
    88Shouldn't you use proxy_model_ct instead of concrete_model_ct in the first line (as it is used in the second)?
    99
Back to Top