Skip to content

Unit-test-- ensure data is a particular number of hours. #164

Open
@dwreeves

Description

@dwreeves

Basically this issue falls into two parts.

First, make sure the hours limitation works. It has pretty predictable behavior:

(venv) daniel@mbp flagging % psql -d flagging

flagging=# select max(time), min(time) from hobolink;
         max         |         min         
---------------------+---------------------
 2021-02-07 09:40:00 | 2021-01-31 09:50:00
(1 row)

flagging=# select max(time), min(time) from usgs;
         max         |         min         
---------------------+---------------------
 2021-02-07 09:30:00 | 2021-01-31 09:00:00
(1 row)

flagging=# select max(time), min(time) from processed_data;
         max         |         min         
---------------------+---------------------
 2021-02-07 09:00:00 | 2021-01-31 10:00:00
(1 row)

flagging=# select max(time), min(time) from model_outputs;
         max         |         min         
---------------------+---------------------
 2021-02-07 09:00:00 | 2021-01-31 10:00:00
(1 row)

This is based on live data, not the mock data.

That's the second part of this issue. I currently have 1 test that uses live data, and the rest can use mock data. Am I doing a good job at isolating the two categories of tests? There might be a better way of doing this than what I'm currently doing. Need to look into that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dataAnything related to databases, data management, stuff that is heavily focused in the data directory.low priorityIssues we are not currently focusing on, either because it has a lot of blockers or isn't important.testingAdding unit-tests and integration tests.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions