def test_shows_all_deployments(self): database = db() depls = [] for i in range(10): depls.append(deployment.create_deployment(database)) uuids = deployment.query_deployments(database) for depl in depls: tools.assert_true(any([depl.uuid == uuid for uuid in uuids]))
def teardown(): try: db = deployment.open_database(db_file) uuids = deployment.query_deployments(db) threads = [] for uuid in uuids: threads.append(threading.Thread(target=destroy,args=(db, uuid))) for thread in threads: thread.start() for thread in threads: thread.join() finally: db.close() os.remove(db_file)