예제 #1
0
 def test_ceasar_unciphres_with_none_and_int_values(self):
     with self.assertRaises(TypeError) as context:
         self.assertRaises(TypeError, ceasar_unciphres(None, 2))
     exception_message = str(context.exception)
     self.assertEqual('TypeError', exception_message)
예제 #2
0
 def test_ceasar_unciphres_3(self):
     given_answer = \
         ceasar_unciphres('xyzabcdefghijklmnopqrstuv', 'fknrfpfqfl exbobqfzxb moxsfqxqfp pxkzqrj lccfzfrj')
     expected_value = 'inquisitio haereticae pravitatis sanctum officium'
     self.assertEqual(expected_value, given_answer)
예제 #3
0
 def test_ceasar_unciphres(self):
     given_answer = \
         ceasar_unciphres('defghijklmnopqrstuvxyzabc', 'lqtylvlxlr kdhuhxlfdh sudzlxdxlv vdqfxyp riilflyp')
     expected_value = 'inquisitio haereticae pravitatis sanctum officium'
     self.assertEqual(expected_value, given_answer)
예제 #4
0
 def test_ceasar_unciphres_2(self):
     given_answer = \
         ceasar_unciphres('abcdefghijklmnopqrstuvxyz', 'inquisitio haereticae pravitatis sanctum officium')
     expected_value = 'inquisitio haereticae pravitatis sanctum officium'
     self.assertEqual(expected_value, given_answer)
예제 #5
0
 def test_ceasar_unciphres_with_list_and_int_values_2(self):
     with self.assertRaises(TypeError) as context:
         self.assertRaises(TypeError,
                           ceasar_unciphres(12, ['1', '2', '3', '4']))
     exception_message = str(context.exception)
     self.assertEqual('TypeError', exception_message)