Skip to content

Commit 9800437

Browse files
committed
flake8 pytest fixes for actblue and action builder
1 parent d466f78 commit 9800437

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/test_actblue/test_actblue.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import unittest
22
from unittest.mock import MagicMock
33

4+
import pytest
45
import requests_mock
56

67
from parsons import ActBlue, Table
@@ -87,7 +88,7 @@ def test_error_on_complete_without_download_url(self, m):
8788

8889
m.get(f"{TEST_URI}/csvs/{TEST_ID}", json=mocked_get_response_no_url)
8990

90-
with self.assertRaises(ValueError):
91+
with pytest.raises(ValueError, match="CSV generation failed"):
9192
self.ab.get_download_url(csv_id=TEST_ID)
9293

9394
@requests_mock.Mocker()
@@ -100,7 +101,7 @@ def test_error_on_unexpected_status(self, m):
100101

101102
m.get(f"{TEST_URI}/csvs/{TEST_ID}", json=mocked_get_response_no_url)
102103

103-
with self.assertRaises(ValueError):
104+
with pytest.raises(ValueError, match="CSV generation failed"):
104105
self.ab.get_download_url(csv_id=TEST_ID)
105106

106107
@requests_mock.Mocker()

test/test_action_builder/test_action_builder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ def test_upsert_connection_missing_identifiers(self, m):
473473
self.bldr.upsert_connection(self.fake_entity_id)
474474
with pytest.raises(ValueError, match="Must provide exactly two identifiers"):
475475
self.bldr.upsert_connection([self.fake_entity_id])
476+
with pytest.raises(ValueError, match="Must provide exactly two identifiers"):
476477
self.bldr.upsert_connection(
477478
[self.fake_entity_id, "fake-entity-id-2", "fake-entity-id-3"]
478479
)

0 commit comments

Comments
 (0)