Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
sushantmimani committed Nov 11, 2021
1 parent 62d91a0 commit d502512
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ Features:

Misc:

* [#255](https://github.com/godaddy/tartufo/issues/255) -- Removed deprecated flags
* [#255](https://github.com/godaddy/tartufo/issues/255) - Removed deprecated flags
--include-paths and --exclude-paths
* [#282](https://github.com/godaddy/tartufo/pull/282) - Remove old style config for `exclude-entropy-patterns`

v2.10.0 - 3 November 2021
------------
Expand Down
10 changes: 0 additions & 10 deletions tartufo/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@
Optional,
Tuple,
TYPE_CHECKING,
Pattern,
)

import click
import git
import pygit2

from tartufo import types
from tartufo.types import Rule

if TYPE_CHECKING:
from tartufo.scanner import Issue # pylint: disable=cyclic-import
from tartufo.scanner import ScannerBase # pylint: disable=cyclic-import
from tartufo.config import OptionTypes # pylint: disable=cyclic-import


DATETIME_FORMAT: str = "%Y-%m-%d %H:%M:%S"
Expand All @@ -50,13 +47,6 @@ def del_rw(_func: Callable, name: str, _exc: Exception) -> None:
os.remove(name)


def convert_regexes_to_rules(regexes: Dict[str, Pattern]) -> Dict[str, Rule]:
return {
name: Rule(name=name, pattern=pattern, path_pattern=None, re_match_type="match")
for name, pattern in regexes.items()
}


def echo_result(
options: "types.GlobalOptions",
scanner: "ScannerBase",
Expand Down
4 changes: 1 addition & 3 deletions tests/test_base_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,10 @@ def test_entropy_string_is_excluded(self):
{
"path-pattern": r"docs/.*\.md",
"pattern": "f.*",
"match-type": "search",
"scope": "line",
}
]
excluded = self.scanner.entropy_string_is_excluded(
"bar", "foo", "docs/README.md"
"foo", "barfoo", "docs/README.md"
)
self.assertEqual(True, excluded)

Expand Down

0 comments on commit d502512

Please sign in to comment.