Skip to content

Commit 867a5fe

Browse files
committed
TestEnigmaBA133
1 parent 7616f5a commit 867a5fe

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/EnigmaB_A133_tests.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,19 @@
99
import unittest
1010

1111

12-
class TestEnigmaD(unittest.TestCase):
12+
class TestEnigmaBA133(unittest.TestCase):
13+
14+
def test_enigma_B_rotors_I_I_I_ring_1_denis(self):
15+
rotor1 = EnigmaB_A133RotorI()
16+
rotor2 = EnigmaB_A133RotorI()
17+
rotor3 = EnigmaB_A133RotorI(ring=1)
18+
reflector = ReflectorUKW_EnigmaB_A133()
19+
etw = EnigmaB_A133Etw()
20+
enigma = EnigmaB_A133(rotor3, rotor2, rotor1, reflector, etw, True)
21+
cleartext = 'denis'
22+
my_encrypted_string = enigma.input_string(cleartext)
23+
self.assertEqual(my_encrypted_string,"åjsäz","Enigma encryption error")
24+
1325
def test_enigma_B_rotors_I_I_I_small_string(self):
1426
rotor1 = EnigmaB_A133RotorI()
1527
rotor2 = EnigmaB_A133RotorI()

0 commit comments

Comments
 (0)