test: add missing analyzer unit tests and datafinder date validation#3783
Open
SNO7E-G wants to merge 4 commits intogoogle:masterfrom
Open
test: add missing analyzer unit tests and datafinder date validation#3783SNO7E-G wants to merge 4 commits intogoogle:masterfrom
SNO7E-G wants to merge 4 commits intogoogle:masterfrom
Conversation
Collaborator
|
/gemini review |
27321bc to
4c92dfd
Compare
Author
|
@jaegeral |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Team 👋
This PR cleans up four
TODOcomments that have been sitting in the codebase fora while — all of them asking for test coverage or input validation that was never
implemented. Nothing drastic, just filling in the gaps.
Closes #3782
What's been bothering me (and hopefully you too)
The NTFS timestomp test file had this as its only test:
self.assertEqual(True, True)
The domain test file was 22 lines and only checked that the class could be
instantiated. The feature extraction test file had a
TODOcomment and nothingelse. And
DataFinderwas silently accepting any string as a date withoutever checking if it was actually ISO 8601.
What this PR does
ntfs_timestomp_test.py— 5 new behavioral tests foris_suspicious():std_info_event→ returns Falsefile_names→ returns Falsetime_delta/time_deltasset correctlydomain_test.py— 4 new MockDataStore-backed behavioral tests:"No domains to analyze."urlfield (nodomain) → correct domain extraction.cloudfront.net) → reported in CDN network countfeature_extraction_test.py— 3 new tests forFeatureExtractionSketchPlugin:plugin_name,feature_name,feature_configplugin_name→ returns"Feature extraction plugin name is empty"cleanlyValueErrormessagedatafinder.py— ISO 8601 date validation:_is_valid_iso_date()helper usingdatetime.fromisoformat()set_start_date()andset_end_date()now log a warning if the input isn't validTODOcommentsChecks
Closing issues
Closes Resolve inline TODOs: missing analyzer tests and datafinder date validation #3782