Skip to content

Commit

Permalink
tests: update test for pj 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdadams committed Oct 8, 2024
1 parent 9b66005 commit 92bdda7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_wmrc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pandas as pd

from wmrc import main


Expand Down Expand Up @@ -35,7 +36,7 @@ def test_update_counties_merges_data_and_shapes(self, mocker):
}
)
mocker.patch("wmrc.main.transform.FeatureServiceMerging.get_live_dataframe", return_value=existing_data)
updater_mock = mocker.patch("wmrc.main.load.FeatureServiceUpdater").return_value
updater_mock = mocker.patch("wmrc.main.load.ServiceUpdater", autospec=True).return_value

county_summaries = pd.DataFrame(
{
Expand All @@ -62,7 +63,7 @@ def test_update_counties_merges_data_and_shapes(self, mocker):
}
)

pd.testing.assert_frame_equal(updater_mock.truncate_and_load_features.call_args[0][0], test_df)
pd.testing.assert_frame_equal(updater_mock.truncate_and_load.call_args[0][0], test_df)


class TestCountyNamesMethod:
Expand Down Expand Up @@ -95,3 +96,4 @@ def test_get_county_names_handles_empty_str_lat_long(self, mocker):
# spatial_mock.from_xy.assert_called_once_with(df_without_empty, "longitude", "latitude")
assert spatial_mock.from_xy.call_count == 1
pd.testing.assert_frame_equal(spatial_mock.from_xy.call_args[0][0], df_without_empty)
pd.testing.assert_frame_equal(spatial_mock.from_xy.call_args[0][0], df_without_empty)

0 comments on commit 92bdda7

Please sign in to comment.