Skip to content

Commit

Permalink
Add LazyScriptNamePrefixedUrl.lstrip to fix tests
Browse files Browse the repository at this point in the history
Needed because of cpython PR
python/cpython#104575
  • Loading branch information
bcail committed Jul 3, 2023
1 parent 939499e commit c951223
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compressor/tests/test_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def __unicode__(self):
def __hash__(self):
return str.__hash__(str(self))

def lstrip(self, *args, **kwargs):
"""
Override ``.lstrip()`` method to make it work with ``{% static %}``.
"""
return str(self).lstrip(*args, **kwargs)

def split(self, *args, **kwargs):
"""
Override ``.split()`` method to make it work with ``{% static %}``.
Expand Down

0 comments on commit c951223

Please sign in to comment.