from dqc_wrapper.test03_temporal_completeness import TemporalCompletenessTest
from dqc_wrapper.unit_tests.conftest import dirs


def test_check_timestamps():
    # Mocked nc is temporal complete
    test = TemporalCompletenessTest(dirs.test_dir, 'test.ini', [dirs.nc_file], dirs.test_dir,  '', 'tas',
                                    '', '', 'no', 'yes')
    response = test.check_timestamps()
    assert response[0] == 'ok'

    # Mocked grib isn't
    test = TemporalCompletenessTest(dirs.test_dir, 'test.ini', [dirs.grib_file], dirs.test_dir, '',
                                    'tas', '', '', 'no', 'yes')
    response = test.check_timestamps()
    assert response[0] == 'err'


if __name__ == "__main__":
    test_check_timestamps()