Skip to content

Commit 9ec130c

Browse files
committed
chore: remove testing non-working SystemRandom
This is merely testing Python internals and actually does nothing as SystemRandom is instationated on import of the secrets module, so the patching done in this test had no effect on the secrets.choice output.
1 parent 4fd8ee5 commit 9ec130c

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

social_core/tests/test_storage.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import random
21
import unittest
32

43
from social_core.storage import (
@@ -189,14 +188,3 @@ def test_is_integrity_error(self) -> None:
189188

190189
def test_random_string(self) -> None:
191190
self.assertTrue(isinstance(self.strategy.random_string(), str))
192-
193-
def test_random_string_without_systemrandom(self) -> None:
194-
def SystemRandom():
195-
raise NotImplementedError
196-
197-
orig_random = getattr(random, "SystemRandom", None)
198-
random.SystemRandom = SystemRandom
199-
200-
strategy = BrokenStrategyWithSettings(storage=BrokenStorage)
201-
self.assertTrue(isinstance(strategy.random_string(), str))
202-
random.SystemRandom = orig_random

0 commit comments

Comments
 (0)