Skip to content

Commit 13d5426

Browse files
authored
simple-cipher: update tests to v1.1.0 (exercism#1409)
See exercism/problem-specifications#1253
1 parent f8fdf13 commit 13d5426

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

exercises/simple-cipher/simple_cipher_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from simple_cipher import Cipher
55

66

7-
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0
7+
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0
88

99
class SimpleCipherTest(unittest.TestCase):
1010
# Utility functions
@@ -21,7 +21,8 @@ def assertRaisesWithMessage(self, exception):
2121
class RandomKeyCipherTest(SimpleCipherTest):
2222
def test_can_encode(self):
2323
cipher = Cipher()
24-
self.assertEqual(cipher.encode('aaaaaaaaaa'), cipher.key[:10])
24+
plaintext = 'aaaaaaaaaa'
25+
self.assertEqual(cipher.encode(plaintext), cipher.key[:len(plaintext)])
2526

2627
def test_can_decode(self):
2728
cipher = Cipher()

0 commit comments

Comments
 (0)