Skip to content

Commit 1a597f6

Browse files
Add test Redshift db
1 parent 0d38a61 commit 1a597f6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_patron_data_helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ def test_get_redshift_patron_data(self, mocker, caplog):
237237
columns=["patron_id", "postal_code", "geoid"])
238238

239239
mock_redshift_client = mocker.MagicMock()
240+
mock_redshift_client.database = "test_db"
240241
mock_redshift_client.execute_query.return_value = \
241242
_TEST_REDSHIFT_RESPONSE
242243

@@ -256,7 +257,8 @@ def test_get_redshift_patron_data(self, mocker, caplog):
256257
# directly. The workaround is to test the total length of the query
257258
# plus that each id appears in it.
258259
query = mock_redshift_client.execute_query.call_args[0][0]
259-
assert len(query) == 175
260+
assert len(query) == 124
261+
assert "patron_info_test_db" in query
260262
for el in ["'obf1'", "'obf2'", "'obf3'", "'obf4'"]:
261263
assert el in query
262264

0 commit comments

Comments
 (0)