Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
def create_dbs():
    cities.create_db()
    if not os.path.exists(db.ROSTER_DB_PATH):
        db.create_roster_db()
Пример #4
0
def create_dbs():
    cities.create_db()
    if not os.path.exists(db.ROSTER_DB_PATH):
        db.create_roster_db()