From 4f29cfe35ce71754e8365d77b225054d9ebf224a Mon Sep 17 00:00:00 2001 From: AnAccountForReportingBugs <45908752+AnAccountForReportingBugs@users.noreply.github.com> Date: Fri, 22 Mar 2019 17:05:55 -0500 Subject: [PATCH 1/2] simple-cipher: update tests to v2.0.0 Fixes #1725 --- exercises/simple-cipher/simple_cipher_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exercises/simple-cipher/simple_cipher_test.py b/exercises/simple-cipher/simple_cipher_test.py index b54f4e24b26..9876362bbe5 100644 --- a/exercises/simple-cipher/simple_cipher_test.py +++ b/exercises/simple-cipher/simple_cipher_test.py @@ -4,7 +4,7 @@ from simple_cipher import Cipher -# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 +# Tests adapted from `problem-specifications//canonical-data.json` @ v2.0.0 class SimpleCipherTest(unittest.TestCase): # Utility functions @@ -65,10 +65,13 @@ def test_can_wrap_on_decode(self): cipher = Cipher('abcdefghij') self.assertEqual(cipher.decode('zabcdefghi'), 'zzzzzzzzzz') - def test_can_handle_messages_longer_than_key(self): + def test_can_encode_messages_longer_than_key(self): cipher = Cipher('abc') self.assertEqual(cipher.encode('iamapandabear'), 'iboaqcnecbfcr') + def test_can_decode_messages_longer_than_key(self): + cipher = Cipher('abc') + self.assertEqual(cipher.decode('iboaqcnecbfcr'), 'iamapandabear') if __name__ == '__main__': unittest.main() From 265b0e634dac9b71a862a603422bb4f03c367374 Mon Sep 17 00:00:00 2001 From: AnAccountForReportingBugs <45908752+AnAccountForReportingBugs@users.noreply.github.com> Date: Fri, 22 Mar 2019 17:09:41 -0500 Subject: [PATCH 2/2] Fix flake8 violation --- exercises/simple-cipher/simple_cipher_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/simple-cipher/simple_cipher_test.py b/exercises/simple-cipher/simple_cipher_test.py index 9876362bbe5..6e8839cd752 100644 --- a/exercises/simple-cipher/simple_cipher_test.py +++ b/exercises/simple-cipher/simple_cipher_test.py @@ -73,5 +73,6 @@ def test_can_decode_messages_longer_than_key(self): cipher = Cipher('abc') self.assertEqual(cipher.decode('iboaqcnecbfcr'), 'iamapandabear') + if __name__ == '__main__': unittest.main()