# Path: chirp/library/audio_file_test.py
# TESTDATA = os.path.join(ROOT_DIR, "library/testdata/audio_file_test")
# TEST_VOL = 65
# TEST_TS = 1230430574
# TEST_FP = "7" * 40
# TEST_UFID = ufid.ufid(TEST_VOL, TEST_TS, TEST_FP)
# TEST_UFID_PREFIX = ufid.ufid_prefix(TEST_VOL, TEST_TS)
# def get_test_audio_file(n):
#     def test_basic(self):
#     def test_tag_accessors(self):
#     def test_scan_fast_tag_handling(self):
#     def test_scan_no_chirp_tags(self):
#     def test_scan_has_chirp_tags(self):
# class AudioFileTest(unittest.TestCase):
#         class MockInfo(object): pass
# 
# Path: chirp/library/do_delete_audio_file_from_db.py
# class AudioFileManager(object):
#     def __init__(self, library_db_file=None):
#     def _select_rows(self, cursor):
#     def print_rows(self, rows):
#     def get_rows(self, fingerprints, table):
#     def get_tags(self, fingerprints):
#     def get_audio_files(self, fingerprints):
#     def del_rows(self, fingerprints, table):
#     def del_tags(self, fingerprints):
#     def del_audiofiles(self, fingerprints):
# def main():
# 
# Path: chirp/library/database.py
# def _insert(target, table_name, insert_tuple):
# def _insert_tags(conn, fingerprint, timestamp, mutagen_id3):
# def _get_tags(conn, au_file, cutoff_timestamp):
# def _audio_file_generator(conn, sql):
#     def __init__(self, name):
#     def _get_connection(self):
#     def create_tables(self):
#     def get_all(self):
#     def get_all_imports(self):
#     def get_by_import(self, vol, import_timestamp):
#     def get_by_fingerprint(self, fingerprint):
#     def begin_add(self, volume, import_timestamp):
#     def update(self, au_file, timestamp):
#     def __init__(self, volume, import_timestamp, conn):
#     def add(self, au_file):
#     def commit(self):
#     def revert(self):
# class Database(object):
# class _AddTransaction(object):


import os
import time
import unittest
from mock import patch
from chirp.library import audio_file_test
from chirp.library import do_delete_audio_file_from_db
from chirp.library import database
        test_fingerprint_1 = "0000000000000020"

        # Create db tables
        self.assertTrue(self.db.create_tables())
        self._add_test_audiofiles()

        # make sure 10 records exist
        self.assertEqual(len(list(self.db.get_all())), 10)

        afm = do_delete_audio_file_from_db.AudioFileManager(
            library_db_file=self.name)

        # TEST
        afm.del_audiofiles([test_fingerprint_1])

        # RESULTS
        # make sure nothing was deleted
        self.assertEqual(len(list(self.db.get_all())), 10)

    def test_del_audiofiles__raises_exception(self):
        # SETUP
        test_fingerprint_1 = "0000000000000007"

        # Create db tables
        self.assertTrue(self.db.create_tables())
        self._add_test_audiofiles()

        # make sure 10 records exist
        self.assertEqual(len(list(self.db.get_all())), 10)


# Path: chirp/library/audio_file_test.py
# TESTDATA = os.path.join(ROOT_DIR, "library/testdata/audio_file_test")
# TEST_VOL = 65
# TEST_TS = 1230430574
# TEST_FP = "7" * 40
# TEST_UFID = ufid.ufid(TEST_VOL, TEST_TS, TEST_FP)
# TEST_UFID_PREFIX = ufid.ufid_prefix(TEST_VOL, TEST_TS)
# def get_test_audio_file(n):
#     def test_basic(self):
#     def test_tag_accessors(self):
#     def test_scan_fast_tag_handling(self):
#     def test_scan_no_chirp_tags(self):
#     def test_scan_has_chirp_tags(self):
# class AudioFileTest(unittest.TestCase):
#         class MockInfo(object): pass
# 
# Path: chirp/library/do_delete_audio_file_from_db.py
# class AudioFileManager(object):
#     def __init__(self, library_db_file=None):
#     def _select_rows(self, cursor):
#     def print_rows(self, rows):
#     def get_rows(self, fingerprints, table):
#     def get_tags(self, fingerprints):
#     def get_audio_files(self, fingerprints):
#     def del_rows(self, fingerprints, table):
#     def del_tags(self, fingerprints):
#     def del_audiofiles(self, fingerprints):
# def main():
# 
# Path: chirp/library/database.py
# def _insert(target, table_name, insert_tuple):
# def _insert_tags(conn, fingerprint, timestamp, mutagen_id3):
# def _get_tags(conn, au_file, cutoff_timestamp):
# def _audio_file_generator(conn, sql):
#     def __init__(self, name):
#     def _get_connection(self):
#     def create_tables(self):
#     def get_all(self):
#     def get_all_imports(self):
#     def get_by_import(self, vol, import_timestamp):
#     def get_by_fingerprint(self, fingerprint):
#     def begin_add(self, volume, import_timestamp):
#     def update(self, au_file, timestamp):
#     def __init__(self, volume, import_timestamp, conn):
#     def add(self, au_file):
#     def commit(self):
#     def revert(self):
# class Database(object):
# class _AddTransaction(object):


# Path: chirp/library/do_delete_audio_file_from_db_test.py
import os
import time
import unittest
from mock import patch
from chirp.library import audio_file_test
from chirp.library import do_delete_audio_file_from_db
from chirp.library import database

        test_fingerprint_1 = "0000000000000020"

        # Create db tables
        self.assertTrue(self.db.create_tables())
        self._add_test_audiofiles()

        # make sure 10 records exist
        self.assertEqual(len(list(self.db.get_all())), 10)

        afm = do_delete_audio_file_from_db.AudioFileManager(
            library_db_file=self.name)

        # TEST
        afm.del_audiofiles([test_fingerprint_1])

        # RESULTS
        # make sure nothing was deleted
        self.assertEqual(len(list(self.db.get_all())), 10)

    def test_del_audiofiles__raises_exception(self):
        # SETUP
        test_fingerprint_1 = "0000000000000007"

        # Create db tables
        self.assertTrue(self.db.create_tables())
        self._add_test_audiofiles()

        # make sure 10 records exist
        self.assertEqual(len(list(self.db.get_all())), 10)


        afm = do_delete_audio_file_from_db.AudioFileManager(