Skip to content

Commit 58a689c

Browse files
simple-cipher: update tests to v2.0.0 (#1733)
* simple-cipher: update tests to v2.0.0 Fixes #1725 * Fix flake8 violation
1 parent a032397 commit 58a689c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

exercises/simple-cipher/simple_cipher_test.py

Lines changed: 6 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.2.0
7+
# Tests adapted from `problem-specifications//canonical-data.json` @ v2.0.0
88

99
class SimpleCipherTest(unittest.TestCase):
1010
# Utility functions
@@ -65,10 +65,14 @@ def test_can_wrap_on_decode(self):
6565
cipher = Cipher('abcdefghij')
6666
self.assertEqual(cipher.decode('zabcdefghi'), 'zzzzzzzzzz')
6767

68-
def test_can_handle_messages_longer_than_key(self):
68+
def test_can_encode_messages_longer_than_key(self):
6969
cipher = Cipher('abc')
7070
self.assertEqual(cipher.encode('iamapandabear'), 'iboaqcnecbfcr')
7171

72+
def test_can_decode_messages_longer_than_key(self):
73+
cipher = Cipher('abc')
74+
self.assertEqual(cipher.decode('iboaqcnecbfcr'), 'iamapandabear')
75+
7276

7377
if __name__ == '__main__':
7478
unittest.main()

0 commit comments

Comments
 (0)