Repository: fhightower/ioc-finder (language: python)

Issue:
Document new testing paradigm



Discussion / hints:

Fix patch:
diff --git a/docs/development.md b/docs/development.md
index 0987731..1db0544 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -20,6 +20,35 @@ docker-compose run --rm test
 
 Typically, this command will run [pytest][pytest-link] on the project's test suite. To view the details of what this command does, take a look at the `test` service in the project's `docker-compose.yml` file.
 
+### Understanding our Testing Framework
+
+There are two types of tests in the `ioc-finder/tests/` directory:
+
+1. Standard tests in test_*.py files
+2. Tests run by `ioc-finder/tests/test_find_iocs.py`
+
+In this section of the documentation, we'll discuss the second set of tests (those run by `ioc-finder/tests/test_find_iocs.py`).
+
+In the `ioc-finder/tests/find_iocs_cases` dir, there are files which define test cases with an input and expected output for different types of observables (a.k.a. indicators).
+
+A test case is a [`pytest.param`](https://docs.pytest.org/en/stable/reference/reference.html?highlight=The%20id%20to%20attribute%20to%20this%20parameter%20set#pytest.param) object
+that takes these arguments:
+
+- The input to the `ioc_finder.find_iocs` function (a string)
+- The expected output from the `ioc_finder.find_iocs` function (a dict)
+- (*Optional*) Kwargs for the `ioc_finder.find_iocs` function (a dict)
+- The `id` kwarg providing a name for the test (a string)
+
+An example looks like:
+
+```python
+from pytest import param
+
+param('as1234', {'asns': ['ASN1234']}, {}, id="asn_1")
+```
+
+`ioc-finder/tests/test_find_iocs.py` collects data from the `ioc-finder/tests/find_iocs_cases/` dir and runs tests to make sure the `find_iocs` function returns the expected data.
+
 ## Lint ioc-finder 🧹
 
 To lint ioc-finder, run the following command from the root directory of the project:


Test patch:
diff --git a/tests/find_iocs_cases/__init__.py b/tests/find_iocs_cases/__init__.py
index 6c794d4..33dead5 100644
--- a/tests/find_iocs_cases/__init__.py
+++ b/tests/find_iocs_cases/__init__.py
@@ -1,16 +1,16 @@
 from .asns import ASN_DATA
+from .attack_data import ATTACK_DATA
+from .coins import COIN_DATA
 from .cves import CVE_DATA
 from .domains import DOMAIN_DATA
 from .email import EMAIL_DATA
-from .hashes import HASH_DATA
-from .ip_addr import IP_DATA
-from .tlp_labels import TLP_DATA
-from .attack_data import ATTACK_DATA
-from .registry_keys import REGISTRY_DATA
 from .file_paths import PATH_DATA
+from .hashes import HASH_DATA
 from .ids import ID_DATA
-from .coins import COIN_DATA
+from .ip_addr import IP_DATA
 from .mac_addr import MAC_DATA
+from .registry_keys import REGISTRY_DATA
+from .tlp_labels import TLP_DATA
 from .user_agents import UA_DATA
 
 cases = [