Skip to content

Commit

Permalink
Merge pull request #974 from cjwatson/aiohttp-3.10.0-compat
Browse files Browse the repository at this point in the history
Fix tests with aiohttp >= 3.10.0
  • Loading branch information
fronzbot authored Aug 8, 2024
2 parents 0a3ba30 + 72133dd commit e2c747b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class TestAPI(IsolatedAsyncioTestCase):
"""Test the API class in blinkpy."""

def setUp(self):
async def asyncSetUp(self):
"""Set up Login Handler."""
self.blink = Blink(session=mock.AsyncMock())
self.auth = Auth()
Expand Down
8 changes: 4 additions & 4 deletions tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class TestAuth(IsolatedAsyncioTestCase):
"""Test the Auth class in blinkpy."""

def setUp(self):
async def asyncSetUp(self):
"""Set up Login Handler."""
self.auth = Auth()

Expand All @@ -29,7 +29,7 @@ def tearDown(self):

@mock.patch("blinkpy.helpers.util.gen_uid")
@mock.patch("blinkpy.auth.util.getpass")
def test_empty_init(self, getpwd, genuid):
async def test_empty_init(self, getpwd, genuid):
"""Test initialization with no params."""
auth = Auth()
self.assertDictEqual(auth.data, {})
Expand All @@ -47,7 +47,7 @@ def test_empty_init(self, getpwd, genuid):

@mock.patch("blinkpy.helpers.util.gen_uid")
@mock.patch("blinkpy.auth.util.getpass")
def test_barebones_init(self, getpwd, genuid):
async def test_barebones_init(self, getpwd, genuid):
"""Test basebones initialization."""
login_data = {"username": "foo", "password": "bar"}
auth = Auth(login_data)
Expand All @@ -64,7 +64,7 @@ def test_barebones_init(self, getpwd, genuid):
}
self.assertDictEqual(auth.data, expected_data)

def test_full_init(self):
async def test_full_init(self):
"""Test full initialization."""
login_data = {
"username": "foo",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_blinkpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def tearDown(self):
"""Cleanup blink test object."""
self.blink = None

def test_initialization(self):
async def test_initialization(self):
"""Verify we can initialize blink."""
blink = Blink()
self.assertEqual(blink.version, __version__)
Expand Down

0 comments on commit e2c747b

Please sign in to comment.