diff --git a/tests/test_asset.py b/tests/test_asset.py index 034b8ae2..b7b2afcf 100644 --- a/tests/test_asset.py +++ b/tests/test_asset.py @@ -10,11 +10,12 @@ def test_asset_args(asset_inputs): kwargs = asset_inputs[0] - url = kwargs.pop('url') + url = kwargs.pop("url") asset = Asset(url, **kwargs) assert asset.place == "nashcounty" assert asset.place_name == "Nash County" + @pytest.fixture def asset_collection(asset_inputs): return AssetCollection([Asset(**kwargs) for kwargs in asset_inputs]) diff --git a/tests/test_civic_plus_site.py b/tests/test_civic_plus_site.py index aa35b6e0..aea0dd23 100644 --- a/tests/test_civic_plus_site.py +++ b/tests/test_civic_plus_site.py @@ -45,21 +45,27 @@ def test_scrape_defaults(): for asset in assets: assert asset.meeting_date in expected_meeting_dates # Check range of asset types - expected_asset_types = ['agenda', 'minutes', 'agenda', 'agenda', 'minutes', 'agenda'] + expected_asset_types = [ + "agenda", + "minutes", + "agenda", + "agenda", + "minutes", + "agenda", + ] actual_asset_types = [asset.asset_type for asset in assets] assert expected_asset_types == actual_asset_types - def test_place_name_arg(): site_url = "https://ca-losaltoshills.civicplus.com/AgendaCenter" site = CivicPlusSite(site_url) # default - assert site.place == 'losaltoshills' - assert site.place_name == None + assert site.place == "losaltoshills" + assert site.place_name is None # Now test with the arg - site2 = CivicPlusSite(site_url, place_name='Los Altos Hills') - assert site2.place_name == 'Los Altos Hills' + site2 = CivicPlusSite(site_url, place_name="Los Altos Hills") + assert site2.place_name == "Los Altos Hills" @pytest.mark.vcr()