Ejemplo n.º 1
0
 def test_make_password(self):
     """
     Build a time-sensitive password for a request.
     """
     timestamp = format_timestamp(datetime(2013, 6, 18, 10, 59, 33))
     self.assertEqual('1f2e67e642b16f6623459fa76dc3894f',
                      make_password('user', 'password', timestamp))
Ejemplo n.º 2
0
 def test_format(self):
     """
     Format a `datetime` instance timestamp according to ParlayX
     requirements.
     """
     self.assertEqual('20130618105933',
                      format_timestamp(datetime(2013, 6, 18, 10, 59, 33)))