Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #2

Merged
merged 14 commits into from
Sep 10, 2016
Prev Previous commit
Next Next commit
change site default to None
  • Loading branch information
mroberge committed Sep 6, 2016
commit 4607a8d1374b483344cd5aec5dd6be813fbba6fc
5 changes: 3 additions & 2 deletions hydrofunctions/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
class Station(object):
"""A class for organizing stream gauge data for a single site."""

def __init__(self, site="", service="dv", start_date=None, end_date=None):
def __init__(self, site=None, service="dv", start_date=None, end_date=None):
self.site = site
self.service = service
self.start_date = start_date
self.end_date = end_date


def fetch(self):
get_nwis(self.site, self.service, self.start_date, self.end_date)
4 changes: 2 additions & 2 deletions tests/test_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def test_station_is_obj(self):
actual = station.Station()
self.assertIsInstance(actual, station.Station)

def test_station_site_defaults_to_empty_str(self):
def test_station_site_defaults_to_None(self):
actual = station.Station()
self.assertEqual(actual.site, "")
self.assertIsNone(actual.site)

def test_station_site_sets(self):
expected = "0123"
Expand Down