예제 #1
0
def test_default_style_state():
    u = URL('test')
    hash(u)
    u.__setstate__((None, {
        '_val': 'test',
        '_strict': False,
        '_cache': {'hash': 1},
    }))
    assert not u._cache
    assert u._val == 'test'
    assert u._strict is False
예제 #2
0
def test_default_style_state():
    u = URL("test")
    hash(u)
    u.__setstate__((None, {
        "_val": "test",
        "_strict": False,
        "_cache": {
            "hash": 1
        }
    }))
    assert not u._cache
    assert u._val == "test"
예제 #3
0
def test_default_style_state():
    u = URL("test")
    hash(u)
    u.__setstate__((None, {"_val": "test", "_strict": False, "_cache": {"hash": 1}}))
    assert not u._cache
    assert u._val == "test"