Changes between Initial Version and Version 1 of Ticket #28703


Ignore:
Timestamp:
Oct 12, 2017, 10:34:05 AM (7 years ago)
Author:
Tim Graham
Comment:

It seems to me that such a URL introspection test in your project is testing an internal implementation in Django that could be subject to change in the future. Can you give an idea of what regressions you're looking to test for? I wonder if a test that inspects _registry (or perhaps better yet, uses the site.is_registered() method) would be more appropriate.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28703

    • Property Summary Endpoint regex pattern construction is not stableURL regex for admin's app_index view isn't constructed deterministically
    • Property Type UncategorizedCleanup/optimization
  • Ticket #28703 – Description

    initial v1  
    22
    33The regex pattern that is constructed for an endpoint is not stable. For instance, in my project I have seen it construct each of the following:
    4 
     4{{{
    55^admin/^(?P<app_label>social_django|authtoken|queues|jobs|files|users|clusters|appps|auth|vdcs)/$
    66^admin/^(?P<app_label>social_django|auth|users|vdcs|appps|jobs|queues|authtoken|clusters|files)/$
    77^admin/^(?P<app_label>authtoken|appps|social_django|clusters|users|queues|jobs|vdcs|auth|files)/$
    88^admin/^(?P<app_label>authtoken|appps|social_django|clusters|users|queues|vdcs|jobs|auth|files)/$
    9 
     9}}}
    1010This precludes the use of patterns in unit tests.
    1111
Back to Top