def test_cleanlyAcquire(self):
        """
        If the lock has never been held, it can be acquired and the C{clean}
        and C{locked} attributes are set to C{True}.
        """
        lockf = self.mktemp()
        lock = lockfile.FilesystemLock(lockf)
        self.assertTrue(lock.lock())
        self.assertTrue(lock.clean)
        self.assertTrue(lock.locked)

        If the lock has never been held, it can be acquired and the C{clean}
        and C{locked} attributes are set to C{True}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_lockfile.py