File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44from 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
99class 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
7377if __name__ == '__main__' :
7478 unittest .main ()
You can’t perform that action at this time.
0 commit comments