Skip to content

Commit 42d3b7b

Browse files
committed
adapt cookie tests to changed interface
1 parent 4fd791f commit 42d3b7b

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

test/test_pyosmium_get_changes.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ def mock_get(session, url, **kwargs):
4848
monkeypatch.setattr(osmium.replication.server.requests.Session, "get", mock_get)
4949

5050

51-
@pytest.fixture
52-
def mock_urllib(self, monkeypatch):
53-
def mock_get(_, url, **kwargs):
54-
return BytesIO(self.urls[url.get_full_url()])
55-
monkeypatch.setattr(self.script['urlrequest'].OpenerDirector, "open", mock_get)
56-
57-
5851
def url(self, url, result):
5952
self.urls[url] = dedent(result).encode()
6053

@@ -103,7 +96,7 @@ def test_init_from_seq_file(self, tmp_path):
10396
assert fname.read_text() == '453'
10497

10598

106-
def test_init_date_with_cookie(self, capsys, tmp_path, mock_urllib):
99+
def test_init_date_with_cookie(self, capsys, tmp_path, mock_requests):
107100
self.url('https://planet.osm.org/replication/minute//state.txt',
108101
"""\
109102
sequenceNumber=100

0 commit comments

Comments
 (0)