Example #1
0
 def _getId(self):
     """Transfer job / request / id will consist of hostname of the
        machine fdtcp is invoked on and timestamp. This id will be used
        in all requests to fdtd for tracking the state of the transfer
        job, esp. by MonALISA ApMon.
        Transfers at fdtd will be associated with this ID - make it as
        unique as possible to avoid collisions.
     """
     h = getHostName()
     u = getUserName()
     dt = getDateTime()
     r = getRandomString('a', 'z', 5)
     id = "fdtcp-%s-%s-%s-%s" % (h, u, dt, r)
     return id
Example #2
0
def testGetUserName():
    user = getUserName()
    assert os.environ["LOGNAME"] == user
    assert isinstance(user, str)
Example #3
0
def testGetUserName():
    user = getUserName()
    assert os.environ["LOGNAME"] == user
    assert isinstance(user, str)