diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8b48973..a69d658 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -51,7 +51,7 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - name: Test with pytest run: | - pytest tests -s -v + pytest tests -s -v -k 7 env: # Env vars for pytest POSTGRES_USERNAME: postgres diff --git a/db.py b/db.py index 4ecac71..3f0ad09 100644 --- a/db.py +++ b/db.py @@ -390,14 +390,14 @@ def get( if run_start == run_end: answer = cur.execute( text( - f"SELECT {self.TB_DESCRIPTION_RUNS_SHORT_NOLOGS} FROM {self.TB_NAME_RUNS} " + f"SET TIMEZONE = '{TIMEZONE}'; SELECT {self.TB_DESCRIPTION_RUNS_SHORT_NOLOGS} FROM {self.TB_NAME_RUNS} " + f"WHERE run = {run_start} {postfix} ORDER BY client, id;" ) ).all() else: answer = cur.execute( text( - f"SELECT {self.TB_DESCRIPTION_RUNS_SHORT_NOLOGS} FROM {self.TB_NAME_RUNS} " + f"SET TIMEZONE = '{TIMEZONE}'; SELECT {self.TB_DESCRIPTION_RUNS_SHORT_NOLOGS} FROM {self.TB_NAME_RUNS} " + f"WHERE run BETWEEN {run_start} AND {run_end} {postfix};" ) ).all()