# Path: afl_utils/afl_stats.py
# def show_info():
# def read_config(config_file):
# def twitter_init(config):
# def shorten_tweet(tweet):
# def fuzzer_alive(pid):
# def parse_stat_file(stat_file, summary=True):
# def load_stats(fuzzer_dir, summary=True):
# def summarize_stats(stats):
# def diff_stats(sum_stats, old_stats):
# def prettify_stat(stat, dstat, console=True):
# def dump_stats(config_settings, database):
# def fetch_stats(config_settings, twitter_inst):
# def main(argv):
# 
# Path: db_connectors/con_sqlite.py
# class sqliteConnector:
#     def __init__(self, database_path, verbose=True):
#     def init_database(self, table, table_spec):
#     def dataset_exists(self, table, dataset, compare_fields):
#     def insert_dataset(self, table, dataset):
#     def commit_close(self):


from afl_utils import afl_stats
from db_connectors import con_sqlite
    import simplejson as json
    import json
import os
import socket
import unittest
    'fuzzer_pid': 0,
    'paths_total': 420.0,
    'unique_crashes': 0,
    'execs_done': 372033733.0,
    'afl_banner': 'target_000',
    'unique_hangs': 13.0,
    'host': socket.gethostname()[:10]
}


class AflStatsTestCase(unittest.TestCase):
    def setUp(self):
        # Use to set up test environment prior to test case
        # invocation
        pass

    def tearDown(self):
        # Use for clean up after tests have run
        self.clean_remove('./testdata/afl-stats.db')
        self.clean_remove('./testdata/afl-stats2.db')
        try:
            os.remove('.afl_stats.sync')
        except FileNotFoundError:
            pass

    def clean_remove(self, file):
        if os.path.exists(file):
            os.remove(file)

    def test_show_info(self):

# Path: afl_utils/afl_stats.py
# def show_info():
# def read_config(config_file):
# def twitter_init(config):
# def shorten_tweet(tweet):
# def fuzzer_alive(pid):
# def parse_stat_file(stat_file, summary=True):
# def load_stats(fuzzer_dir, summary=True):
# def summarize_stats(stats):
# def diff_stats(sum_stats, old_stats):
# def prettify_stat(stat, dstat, console=True):
# def dump_stats(config_settings, database):
# def fetch_stats(config_settings, twitter_inst):
# def main(argv):
# 
# Path: db_connectors/con_sqlite.py
# class sqliteConnector:
#     def __init__(self, database_path, verbose=True):
#     def init_database(self, table, table_spec):
#     def dataset_exists(self, table, dataset, compare_fields):
#     def insert_dataset(self, table, dataset):
#     def commit_close(self):


# Path: tests/test_afl_stats.py
from afl_utils import afl_stats
from db_connectors import con_sqlite
    import simplejson as json
    import json
import os
import socket
import unittest

    'fuzzer_pid': 0,
    'paths_total': 420.0,
    'unique_crashes': 0,
    'execs_done': 372033733.0,
    'afl_banner': 'target_000',
    'unique_hangs': 13.0,
    'host': socket.gethostname()[:10]
}


class AflStatsTestCase(unittest.TestCase):
    def setUp(self):
        # Use to set up test environment prior to test case
        # invocation
        pass

    def tearDown(self):
        # Use for clean up after tests have run
        self.clean_remove('./testdata/afl-stats.db')
        self.clean_remove('./testdata/afl-stats2.db')
        try:
            os.remove('.afl_stats.sync')
        except FileNotFoundError:
            pass

    def clean_remove(self, file):
        if os.path.exists(file):
            os.remove(file)

    def test_show_info(self):

        self.assertIsNone(afl_stats.show_info())