Skip to content

Commit f86b24f

Browse files
author
“Brittany
committed
update nose-specific methods as pytest support for nose tests is deprecated and will be removed in a future release
Signed-off-by: “Brittany <[email protected]>
1 parent beb6010 commit f86b24f

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

tests/core/baseline_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
class TestInitializeBaseline:
2424

25-
def setup(self):
25+
def setup_method(self):
2626
self.plugins = (
2727
Base64HighEntropyString(4.5),
2828
HexHighEntropyString(3),

tests/core/secrets_collection_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ class TestBaselineInputOutput:
269269
related to that ability.
270270
"""
271271

272-
def setup(self):
272+
def setup_method(self):
273273
self.logic = secrets_collection_factory(
274274
secrets=[
275275
{

tests/plugins/aws_key_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class TestAWSKeyDetector(object):
1818

19-
def setup(self):
19+
def setup_method(self):
2020
self.example_key = 'AKIAZZZZZZZZZZZZZZZZ'
2121

2222
@pytest.mark.parametrize(

tests/plugins/common/initialize_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_fails_on_bad_initialization(self):
4040

4141
class TestFromSecretType:
4242

43-
def setup(self):
43+
def setup_method(self):
4444
self.settings = [
4545
{
4646
'name': 'Base64HighEntropyString',

tests/plugins/high_entropy_strings_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_entropy_upper_limit(self):
140140

141141
class TestRegularBase64HighEntropyStrings(HighEntropyStringsTest):
142142

143-
def setup(self):
143+
def setup_method(self):
144144
super(TestRegularBase64HighEntropyStrings, self).setup(
145145
# Testing default limit, as suggested by truffleHog.
146146
logic=Base64HighEntropyString(
@@ -238,7 +238,7 @@ def test_env_file(self):
238238

239239

240240
class TestUrlSafeBase64HighEntropyStrings(HighEntropyStringsTest):
241-
def setup(self):
241+
def setup_method(self):
242242
super(TestUrlSafeBase64HighEntropyStrings, self).setup(
243243
# Testing default limit, as suggested by truffleHog.
244244
logic=Base64HighEntropyString(
@@ -267,7 +267,7 @@ def calculate_shannon_entropy(self, data):
267267

268268
class TestHexHighEntropyStrings(HighEntropyStringsTest):
269269

270-
def setup(self):
270+
def setup_method(self):
271271
super(TestHexHighEntropyStrings, self).setup(
272272
# Testing default limit, as suggested by truffleHog.
273273
logic=HexHighEntropyString(

0 commit comments

Comments
 (0)