conftest.py 731 B

12345678910111213141516171819202122232425262728
  1. import sys
  2. from mock import MagicMock
  3. from os import path
  4. import pytest
  5. def pytest_configure(config):
  6. """
  7. Initial test env setup
  8. """
  9. sys.path.append(path.join("backend", "lambda_layers", "boto_utils", "python"))
  10. sys.path.append(path.join("backend", "lambda_layers", "cr_helper", "python"))
  11. sys.path.append(path.join("backend", "lambda_layers", "decorators", "python"))
  12. sys.path.append(path.join("backend", "lambdas", "jobs"))
  13. sys.path.append(path.join("backend", "ecs_tasks", "delete_files"))
  14. @pytest.fixture(autouse=True)
  15. def cr_helper_mocks(monkeypatch):
  16. """
  17. Mock the Custom Resource Helper
  18. """
  19. import crhelper
  20. monkeypatch.setattr(crhelper, "CfnResource", MagicMock())