Exemplo n.º 1
0
 def test_no_email(self):
     '''
     Tests signing a standard request
     '''
     result = create_signature('key', 'secret', 'test-user', '', 1, 'nonce');
     result = dict(result)
     self.assertIn('arkli_key', result)
     self.assertIn('arkli_nonce', result)
     self.assertIn('arkli_timestamp', result)
     self.assertIn('arkli_user', result)
     self.assertIn('arkli_signature', result)
     
     self.assertEqual(result['arkli_signature'],
                         'SoPo6WtIERgfKTo9I/Z1wDQuNSU=')
Exemplo n.º 2
0
 def test_blank(self):
     '''
     Tests signing a blank request
     '''
     result = create_signature('', '', '', '', 1, 'nonce');
     result = dict(result)
     self.assertIn('arkli_key', result)
     self.assertIn('arkli_nonce', result)
     self.assertIn('arkli_timestamp', result)
     self.assertIn('arkli_user', result)
     self.assertIn('arkli_signature', result)
     
     self.assertEqual(result['arkli_signature'],
                         'NJFLQn3cpfZM9gF+ESFKGFInFqg=')