Ensures :attr:`subject` is not *other* (object identity check).
186962
def is_not(self, other):
        
        self._run(unittest_case.assertIsNot, (self._subject, other))
        return ChainInspector(self._subject)
574367
def issuperset(self, other):
        

        if not isinstance(other, Set):
            raise ValueError('other must be a Set instance')
        for item in other.items:
            if not item in self.items:
                return False
        return True
843231
def is_trusted_subject(request):
    """"""
    logging.debug('Active subjects: {}'.format(', '.join(request.all_subjects_set)))
    logging.debug('Trusted subjects: {}'.format(', '.join(get_trusted_subjects())))
    return not request.all_subjects_set.isdisjoint(get_trusted_subjects())
410379
def is_not_in(self, iterable):
        
        self._run(unittest_case.assertNotIn, (self._subject, iterable))
        return ChainInspector(self._subject)
1166306
def identity(obj):
    
    if hasattr(obj, '_concurrencymeta'):
        return mark_safe("{0},{1}".format(unlocalize(obj.pk),
                                          get_revision_of_object(obj)))
    else:
        return mark_safe(unlocalize(obj.pk))
1172376
def _check_model(obj, models=None):
    """"""
    return isinstance(obj, type) and issubclass(obj, pw.Model) and hasattr(obj, '_meta')
741532
private void checkForUTOKENNotFoundError(Subject subj) throws ResourceException {

        // A Subject without a UTOKEN genericCredential can
        // legitimately occur in the case where the resource
        // adapter has indicated Thread Identity Support
        // is "ALLOWED, but a valid Container-managed alias
        // was specified. On the other hand, at this ponit, if
        // either of the following two cases exist when there is
        // no UTOKEN genericCredential, then we have an
        // unexpected error and need to throw an exception:
        //
        //   1. The resource adapter REQUIRES that Thread Identity
        //      be used.
        //
        //   2. The Subject has no private credentials at all
        //

        // Check if ThreadIdentitySupport is "REQUIRED"

        if (m_ThreadIdentitySupport == AbstractConnectionFactoryService.THREAD_IDENTITY_REQUIRED) {

            // ThreadIdentitySupport indicates that the use of thread
            // identity is "REQUIRED" by the connector, but the
            // Subject doesn't contain a UTOKEN GenericCredential.
            // This should not ever occur because finalizeSubject()
            // should have created a Subject with a UTOKEN
            // GenericCredential when ThreadidentitySupport is
            // "REQUIRED". Thus, throw an exception to terminate
            // processing right here.
            //

            try {
                IllegalStateException e = new IllegalStateException("ThreadIdentitySecurityHelper.beforeGettingConnection() detected Subject not setup for using thread identity, but the connector requires thread identity be used.");
                Object[] parms = new Object[] { "ThreadIdentitySecurityHelper.beforeGettingConnection()", e };
                Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", parms);
                throw e;
            } catch (IllegalStateException ise) {
                ResourceException re = new ResourceException("ThreadIdentitySecurityHelper.beforeGettingConnection() detected Subject with illegal state");
                re.initCause(ise);
                throw re;
            }

        } // end if m_ThreadIdentitySupport.equals REQUIRED

        // Check if Subject has at least one a private credential

        Set privateCredentials = subj.getPrivateCredentials();
        Iterator privateIterator = privateCredentials.iterator();

        if (!privateIterator.hasNext()) { // if no private credentials

            // There is not only no UTOKEN generic credential, but
            // also, there are no private credentials at all. This
            // should not happen. If there are no private credentials,
            // the finalizeSubject() processing should have built
            // a UTOKEN generic credential.
            //

            try {
                IllegalStateException e = new IllegalStateException("ThreadIdentitySecurityHelper.beforeGettingConnection() detected Subject with no credentials.");
                Object[] parms = new Object[] { "ThreadIdentitySecurityHelper.beforeGettingConnection()", e };
                Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", parms);
                throw e;
            } catch (IllegalStateException ise) {
                ResourceException re = new ResourceException("ThreadIdentitySecurityHelper.beforeGettingConnection() detected Subject with illegal state");
                re.initCause(ise);
                throw re;
            }

        } // end if no private credentials
    }
1317152
def is_not_none(self):
        
        self._run(unittest_case.assertIsNotNone, (self._subject,))
        return ChainInspector(self._subject)
1024679
def is_not_none(entity, prop, name):
    ""
    return is_not_empty(entity, prop, name) and name in entity._data and getattr(entity, name) is not None
54987
def _identify(self, subject):
        
        ourPrivateCert = self.service.certificateStorage.getPrivateCertificate(
            str(subject)
        )
        ourCA = Certificate(ourPrivateCert.original)
        return dict(certificate=ourCA)
1100256
private void validateSubject(final Resource subject) {
        final String subjectURI = subject.getURI();
        // blank nodes are okay
        if (!subject.isAnon()) {
            // hash URIs with the same base as the topic are okay
            final int hashIndex = subjectURI.lastIndexOf("#");
            if (!(hashIndex > 0 && topic.getURI().equals(subjectURI.substring(0, hashIndex)))) {
                // the topic itself is okay
                if (!topic.equals(subject.asNode())) {
                    // it's a bad subject, but it could still be in-domain
                    if (idTranslator.inDomain(subject)) {
                        LOGGER.error("{} is not in the topic of this RDF, which is {}.", subject, topic);
                        throw new IncorrectTripleSubjectException(subject +
                                " is not in the topic of this RDF, which is " + topic);
                    }
                    // it's not even in the right domain!
                    LOGGER.error("subject ({}) is not in repository domain.", subject);
                    throw new OutOfDomainSubjectException(subject.asNode());
                }
            }
        }
    }
879184
def not_(self, value, name=''):
        
        if isinstance(value.type, types.VectorType):
            rhs = values.Constant(value.type, (-1,) * value.type.count)
        else:
            rhs = values.Constant(value.type, -1)
        return self.xor(value, rhs, name=name)
985781
def ensure_object(self, object_type):
        
        rv = self.find_object(object_type)
        if rv is None:
            self.obj = rv = object_type()
        return rv
514472
def assertNotCookie(self, name, value=None, attrs={}, *args, **kwargs):
        
        return not self.assertCookie(name, value, attrs)
690072
def _checkType(self, obj, identifier):
        """"""
        if not isinstance(obj, basestring):
            raise TypeError("expected %s '%s' to be a string (was '%s')" %
                            (identifier, obj, type(obj).__name__))
707273
def match_head(subject, pattern):
    """"""
    if isinstance(pattern, Pattern):
        pattern = pattern.expression
    pattern_head = get_head(pattern)
    if pattern_head is None:
        return True
    if issubclass(pattern_head, OneIdentityOperation):
        return True
    subject_head = get_head(subject)
    assert subject_head is not None
    return issubclass(subject_head, pattern_head)
1234504
def isSelfSigned(self):
        
        if self.issuer_hash == self.subject_hash:
            return self.isIssuerCert(self)
        return False