def test_create_db(self): cities.create_db() query = cities.find('London') results = list(query) self.failIf(len(results) == 0) full_names = [c.full_name for c in results] self.failIf('London, ENG (United Kingdom)' not in full_names)
def test_find(self): cities.create_db() query = cities.find('London') results = list(query) self.failIf(len(results) == 0) full_names = [c.full_name for c in results] self.failIf('London, ENG (United Kingdom)' not in full_names)
def create_dbs(): cities.create_db() if not os.path.exists(db.ROSTER_DB_PATH): db.create_roster_db()