Skip to content

Commit

Permalink
Fix: Deprecation warnings when running pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
hoh committed Oct 17, 2023
1 parent 3ea89fe commit 0489076
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/aleph/vm/orchestrator/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from sqlalchemy.ext.declarative import declarative_base



from .conf import make_db_url, settings

Session: sessionmaker
Expand Down
10 changes: 5 additions & 5 deletions tests/supervisor/test_resolvectl_dns_servers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Avoid failures linked to nftables when initializing the global VmPool object
import os

from unittest import mock
from aleph.vm.orchestrator.conf import (
resolvectl_dns_servers,
resolvectl_dns_servers_ipv4,
Expand All @@ -9,8 +9,8 @@
os.environ["ALEPH_VM_ALLOW_VM_NETWORKING"] = "False"


def test_resolvectl(mocker):
with mocker.patch(
def test_resolvectl():
with mock.patch(
"aleph.vm.orchestrator.conf.check_output",
return_value="Link 2 (eth0): 109.88.203.3 62.197.111.140\n",
):
Expand All @@ -23,8 +23,8 @@ def test_resolvectl(mocker):
assert dns_servers_ipv4 == servers


def test_resolvectl_ipv6(mocker):
with mocker.patch(
def test_resolvectl_ipv6():
with mock.patch(
"aleph.vm.orchestrator.conf.check_output",
return_value="Link 2 (eth0): 109.88.203.3 62.197.111.140 2a02:2788:fff0:7::3\n 2a02:2788:fff0:5::140\n",
):
Expand Down

0 comments on commit 0489076

Please sign in to comment.