Skip to content

Commit

Permalink
update nose-specific methods as pytest support for nose tests is depr…
Browse files Browse the repository at this point in the history
…ecated and will be removed in a future release

Signed-off-by: “Brittany <[email protected]>
  • Loading branch information
“Brittany committed Dec 21, 2023
1 parent beb6010 commit f86b24f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/core/baseline_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

class TestInitializeBaseline:

def setup(self):
def setup_method(self):
self.plugins = (
Base64HighEntropyString(4.5),
HexHighEntropyString(3),
Expand Down
2 changes: 1 addition & 1 deletion tests/core/secrets_collection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class TestBaselineInputOutput:
related to that ability.
"""

def setup(self):
def setup_method(self):
self.logic = secrets_collection_factory(
secrets=[
{
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/aws_key_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class TestAWSKeyDetector(object):

def setup(self):
def setup_method(self):
self.example_key = 'AKIAZZZZZZZZZZZZZZZZ'

@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/common/initialize_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_fails_on_bad_initialization(self):

class TestFromSecretType:

def setup(self):
def setup_method(self):
self.settings = [
{
'name': 'Base64HighEntropyString',
Expand Down
6 changes: 3 additions & 3 deletions tests/plugins/high_entropy_strings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_entropy_upper_limit(self):

class TestRegularBase64HighEntropyStrings(HighEntropyStringsTest):

def setup(self):
def setup_method(self):
super(TestRegularBase64HighEntropyStrings, self).setup(
# Testing default limit, as suggested by truffleHog.
logic=Base64HighEntropyString(
Expand Down Expand Up @@ -238,7 +238,7 @@ def test_env_file(self):


class TestUrlSafeBase64HighEntropyStrings(HighEntropyStringsTest):
def setup(self):
def setup_method(self):
super(TestUrlSafeBase64HighEntropyStrings, self).setup(
# Testing default limit, as suggested by truffleHog.
logic=Base64HighEntropyString(
Expand Down Expand Up @@ -267,7 +267,7 @@ def calculate_shannon_entropy(self, data):

class TestHexHighEntropyStrings(HighEntropyStringsTest):

def setup(self):
def setup_method(self):
super(TestHexHighEntropyStrings, self).setup(
# Testing default limit, as suggested by truffleHog.
logic=HexHighEntropyString(
Expand Down

0 comments on commit f86b24f

Please sign in to comment.