Skip to content

Commit

Permalink
fix tests -- just broke the mongo connection management
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGermuska committed Jun 28, 2011
1 parent e0b89e3 commit 7bc7b0d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions dataprocessing/tests_sf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TestSimpleGeographies(unittest.TestCase):
def setUp(self):
collection = utils.get_geography_collection()
self.geographies = utils.get_geography_collection()

def _test_totalpop(self, obj, known_2000, known_2010):
"""
Expand Down Expand Up @@ -150,9 +150,7 @@ def test_simple_tract(self):

class TestTracts(unittest.TestCase):
def setUp(self):
connection = Connection()
db = connection[config.CENSUS_DB]
self.geographies = db[config.GEOGRAPHIES_COLLECTION]
self.geographies = utils.get_geography_collection()

def test_tract_split(self):
"""
Expand Down Expand Up @@ -332,9 +330,7 @@ def test_tract_complex_merge(self):

class TestFieldCrosswalk(unittest.TestCase):
def setUp(self):
connection = Connection()
db = connection[config.CENSUS_DB]
self.geographies = db[config.GEOGRAPHIES_COLLECTION]
self.geographies = utils.get_geography_collection()

def test_exact_same_name(self):
state = self.geographies.find_one({ 'geoid': '15' })
Expand Down Expand Up @@ -380,9 +376,7 @@ def test_different_everything(self):
class TestLabels(unittest.TestCase):
def setUp(self):
self.labels = utils.get_label_collection()

db = connection[config.CENSUS_DB]
self.geographies = db[config.GEOGRAPHIES_COLLECTION]
self.geographies = utils.get_geography_collection()

def test_table_count(self):
labels = self.labels.find_one({ 'dataset': 'SF1' })
Expand Down

0 comments on commit 7bc7b0d

Please sign in to comment.