# Path: boris/db_functions.py
# def load_events_in_db(pj: dict,
#                       selected_subjects: list,
#                       selected_observations: list,
#                       selected_behaviors: list,
#                       time_interval: str = TIME_FULL_OBS):
# def load_aggregated_events_in_db(pj: dict, selected_subjects: list, selected_observations: list,
#                                  selected_behaviors: list):
# def load_aggregated_events_in_intervals(pj: dict, selected_subjects: list, selected_observations: list,
#                                         selected_behaviors: list):


import os
import sys
import json
from boris import db_functions
"""
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2020 Olivier Friard

module for testing db_functions.py

pytest -vv test_db_functions.py
"""

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))



class Test_load_events_in_db(object):

    def test_1(self):

        pj = json.loads(open("files/test.boris").read())


# Path: boris/db_functions.py
# def load_events_in_db(pj: dict,
#                       selected_subjects: list,
#                       selected_observations: list,
#                       selected_behaviors: list,
#                       time_interval: str = TIME_FULL_OBS):
# def load_aggregated_events_in_db(pj: dict, selected_subjects: list, selected_observations: list,
#                                  selected_behaviors: list):
# def load_aggregated_events_in_intervals(pj: dict, selected_subjects: list, selected_observations: list,
#                                         selected_behaviors: list):


# Path: tests/test_db_functions.py
import os
import sys
import json
from boris import db_functions

"""
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2020 Olivier Friard

module for testing db_functions.py

pytest -vv test_db_functions.py
"""

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))



class Test_load_events_in_db(object):

    def test_1(self):

        pj = json.loads(open("files/test.boris").read())


        cursor = db_functions.load_events_in_db(pj, ["subject1"], ["observation #1"], ["s"])