Issue 1075: update snapshots using command-line flag (#1249)

* Adding skippable tests using command-line flag
This commit is contained in:
Lucas Merrill Brown 2022-02-14 12:16:52 -05:00 committed by GitHub
commit 3e37d9d1a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 115 additions and 31 deletions

View file

@ -2,6 +2,8 @@
from unittest import mock
import filecmp
import pytest
import requests
from data_pipeline.etl.base import ValidGeoLevel
@ -54,7 +56,9 @@ class TestNationalRiskIndexETL(TestETL):
return etl
# TODO: Add a flag to make this run only when pytest is run with an argument.
# This decorator means that this "test" will only be run by passing that flag to
# pytest, for instance by running `pytest . -rsx --update_snapshots`.
@pytest.mark.update_snapshots
def test_update_test_fixtures(self, mock_etl, mock_paths):
etl = self._setup_etl_instance_and_run_extract(
mock_etl=mock_etl, mock_paths=mock_paths