Ensures :attr:`subject` is ``False``.
333689
def is_false(self):
        
        self._run(unittest_case.assertFalse, (self._subject,))
        return ChainInspector(self._subject)
1046842
def _assert_valid_key(self, name):
    """"""
    if name not in self._measurements:
      raise NotAMeasurementError('Not a measurement', name, self._measurements)
950956
def _set_subject(self, subject):
        
        # if not subject:
        #     self.subject =
        def test_uri(value):
            """ test to see if the value is a uri or bnode

            Returns: Uri or Bnode """
            # .__wrapped__
            if not isinstance(value, (Uri, BlankNode)):
                try:
                    if value.startswith("_:"):
                        return BlankNode(value)
                    else:
                        return Uri(value)
                except:
                    return BlankNode()
            else:
                return value

        if isinstance(subject, dict):
            self.subject = test_uri(subject['s'])
            if isinstance(subject['o'], list):
                for item in subject['o']:
                    self.add_property(subject['p'],
                                      item)
            else:
                self.add_property(subject['p'],
                                  subject['o'])
        else:
            self.subject = test_uri(subject)
1317152
def is_not_none(self):
        
        self._run(unittest_case.assertIsNotNone, (self._subject,))
        return ChainInspector(self._subject)
273974
def _metadata_is_invalid(cls, fact):
        
        return any(isinstance(token, URIRef) and ' ' in token
                   for token in fact)
733513
def denyMapIdentity(self, subject, vendorSpecific=None):
        
        response = self.denyMapIdentityResponse(subject, vendorSpecific)
        return self._read_boolean_response(response)
216425
def equals(self, other):
        
        self._run(unittest_case.assertEqual, (self._subject, other))
        return ChainInspector(self._subject)
341448
def isSelfSigned(self):
        
        if self.issuer == self.subject:
            return self.isIssuerCert(self)
        return False
511358
def has_attribute(self, attr):
        
        if not hasattr(self._subject, attr):
            raise self._error_factory(_format("Expected {} to have attribute {}", self._subject, attr))
        return ReferenceInspector(getattr(self._subject, attr))
62806
def to_bool(self, invert=False):
        """"""
        if invert:
            def function(x, y):
                return False if x else True
        else:
            def function(x, y):
                return True if x else False
        return self.operation(None, function)
1129412
def authenticated(f):
    """"""

    @functools.wraps(f)
    def wrapper(request, *args, **kwargs):
        if d1_common.const.SUBJECT_AUTHENTICATED not in request.all_subjects_set:
            raise d1_common.types.exceptions.NotAuthorized(
                0,
                'Access allowed only for authenticated subjects. Please reconnect with '
                'a valid DataONE session certificate. active_subjects="{}"'.format(
                    d1_gmn.app.auth.format_active_subjects(request)
                ),
            )
        return f(request, *args, **kwargs)

    return wrapper
458073
public function validate($subject): bool
    {
        if (\is_bool($this->schema['uniqueItems']) && ($this->schema['uniqueItems'] === true)) {
            if (\count($subject) !== \count(\array_unique($subject))) {
                return false;
            }
        }
        return true;
    }
80268
def is_negative(self):
        
        self._run(unittest_case.assertLess, (self._subject, 0))
        return ChainInspector(self._subject)
1184102
def ensure_true(bool_func: Callable[[Any], bool],
                message=None) -> Filter_T:
    

    def validate(value):
        if bool_func(value) is not True:
            _raise_failure(message)
        return value

    return validate
687135
function(fact) {
        if ((this.explicit != fact.explicit) ||
            (this.subject != fact.subject) ||
            (this.predicate != fact.predicate) ||
            (this.object != fact.object)) {
            return false;
        }
        return true;
    }
1362260
def assert_is_substring(substring, subject, message=None, extra=None):
    """"""
    assert (
        (subject is not None)
        and (substring is not None)
        and (subject.find(substring) != -1)
    ), _assert_fail_message(message, substring, subject, "is not in", extra)
1033055
def ensure_boolean(arg):
    
    if not isinstance(arg, bool):
        raise TypeError("expected a boolean, got %s" % type(arg).__name__)
    return arg