def test_encryptJ(self): context = fialka.application_context(['-e', '-w', '0', 'A', 'J']) encrypted = fialka.code(context, 'A', 'J') self.assertEqual(encrypted, 'F')
def test_encryptA(self): context = fialka.application_context(['-e', '-w', '0', 'A', 'A']) self.assertEqual(len(context['rotor']), 1) encrypted = fialka.code(context, 'A', 'A') self.assertEqual(encrypted, '7')
def setUp(self): self.context = fialka.application_context( ['-e', 'ABCDEFGH1J', '1GN0REME'])
def test_application_context5(self): with self.assertRaises(ArgumentError): ctxt = fialka.application_context(['ABCDEFGH1J', 'TEST1NG123'])
def test_sanity_check2(self): with self.assertRaises(ValueError): ctxt = fialka.application_context(['-e', 'ABCDEFGHIJ', 'FA1L'])
def test_sanity_check1(self): ctxt = fialka.application_context(['-e', 'ABCDEFGH1J', '1GN0REME']) ctxt['args'].key = 'LO0KIEHERE' with self.assertRaises(ValueError): fialka.sanity_check(ctxt)