'Check that locks don\'t influence each other.'

@DBSubjectLockTest
def testDBSubjectLockIndependence(self):

    subject = u'aff4:/metadata:row\xce\xf1\u0163\xe9r'
    subject2 = u'aff4:/metadata:row\xce\xf1\u0163\xe9r2'
    t1 = data_store.DB.DBSubjectLock(subject, lease_time=100, token=self.token)
    self.assertRaises(data_store.DBSubjectLockError, data_store.DB.DBSubjectLock, subject, lease_time=100, token=self.token)
    t2 = data_store.DB.DBSubjectLock(subject2, lease_time=100, token=self.token)
    self.assertRaises(data_store.DBSubjectLockError, data_store.DB.DBSubjectLock, subject2, lease_time=100, token=self.token)
    t2.Release()
    self.assertRaises(data_store.DBSubjectLockError, data_store.DB.DBSubjectLock, subject, lease_time=100, token=self.token)
    t1.Release()
