Fix tests broken by urlmatch trailing slash change
This commit is contained in:
parent
5fbd488fdf
commit
6c5876a494
@ -411,10 +411,10 @@ class TestConfig:
|
||||
|
||||
def test_get_for_url(self, conf):
|
||||
"""Test conf.get() with an URL/pattern."""
|
||||
pattern = urlmatch.UrlPattern('*://example.com')
|
||||
pattern = urlmatch.UrlPattern('*://example.com/')
|
||||
name = 'content.javascript.enabled'
|
||||
conf.set_obj(name, False, pattern=pattern)
|
||||
assert conf.get(name, url=QUrl('https://example.com/')) is True
|
||||
assert conf.get(name, url=QUrl('https://example.com/')) is False
|
||||
|
||||
@pytest.mark.parametrize('value', [{}, {'normal': {'a': 'nop'}}])
|
||||
def test_get_bindings(self, config_stub, conf, value):
|
||||
|
@ -201,7 +201,7 @@ def test_get_non_matching_fallback_pattern(values, other_pattern):
|
||||
def test_get_equivalent_patterns(empty_values):
|
||||
"""With multiple matching pattern, the last added should win."""
|
||||
pat1 = urlmatch.UrlPattern('https://www.example.com/')
|
||||
pat2 = urlmatch.UrlPattern('https://www.example.com')
|
||||
pat2 = urlmatch.UrlPattern('*://www.example.com/')
|
||||
empty_values.add('pat1 value', pat1)
|
||||
empty_values.add('pat2 value', pat2)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user