2021-03-18 02:05:05 -04:00
|
|
|
import logging
|
2021-02-11 12:53:44 -08:00
|
|
|
import os
|
2021-02-11 23:14:20 -08:00
|
|
|
import sys
|
2021-03-11 02:29:24 -05:00
|
|
|
import time
|
|
|
|
|
|
|
|
import pytest
|
2021-02-11 12:53:44 -08:00
|
|
|
|
|
|
|
# See https://stackoverflow.com/a/33515264.
|
2021-03-11 02:29:24 -05:00
|
|
|
sys.path.append(os.path.join(os.path.dirname(__file__), "test_helpers"))
|
2021-02-03 17:37:09 -08:00
|
|
|
|
2021-02-11 16:00:29 -08:00
|
|
|
pytest_plugins = ["tests.integration.fixtures.sql_fixtures"]
|
2021-03-11 02:29:24 -05:00
|
|
|
|
2021-03-18 02:05:05 -04:00
|
|
|
# Enable debug logging.
|
|
|
|
logging.getLogger().setLevel(logging.DEBUG)
|
|
|
|
os.putenv("DATAHUB_DEBUG", "1")
|
|
|
|
|
2021-03-11 02:29:24 -05:00
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def mock_time(monkeypatch):
|
|
|
|
def fake_time():
|
|
|
|
return 1615443388.0975091
|
|
|
|
|
|
|
|
monkeypatch.setattr(time, "time", fake_time)
|
|
|
|
yield
|