Skip to content

Commit c951223

Browse files
committed
Add LazyScriptNamePrefixedUrl.lstrip to fix tests
Needed because of cpython PR python/cpython#104575
1 parent 939499e commit c951223

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: compressor/tests/test_offline.py

+6
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ def __unicode__(self):
5858
def __hash__(self):
5959
return str.__hash__(str(self))
6060

61+
def lstrip(self, *args, **kwargs):
62+
"""
63+
Override ``.lstrip()`` method to make it work with ``{% static %}``.
64+
"""
65+
return str(self).lstrip(*args, **kwargs)
66+
6167
def split(self, *args, **kwargs):
6268
"""
6369
Override ``.split()`` method to make it work with ``{% static %}``.

0 commit comments

Comments
 (0)