Ejemplo n.º 1
0
    def testBasic(self):
        """Basic test of the function."""
        now = 1234567890
        os.environ["REQUEST_ID_HASH"] = "12345678"

        self.assertEquals("159453012940012345678",
                          model._get_descending_key(gettime=lambda: now))
  def testBasic(self):
    """Basic test of the function."""
    now = 1234567890
    os.environ["REQUEST_ID_HASH"] = "12345678"

    self.assertEquals(
        "159453012940012345678",
        model._get_descending_key(
            gettime=lambda: now))
Ejemplo n.º 3
0
 def testBasic(self):
   """Basic test of the function."""
   now = 1234567890
   random = 78
   self.assertEquals(
       "159453012940078",
       model._get_descending_key(
           gettime=lambda: now,
           getrandint=lambda x, y: random))