Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zstumgoren committed Jun 20, 2023
1 parent e25e06c commit 5cecf62
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion tests/test_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
18 changes: 12 additions & 6 deletions tests/test_civic_plus_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5cecf62

Please sign in to comment.